Title: fix(migrations): case-sensitive migration rollback detection by 0xSherlokMo · Pull Request #3919 · sqlc-dev/sqlc · GitHub
Open Graph Title: fix(migrations): case-sensitive migration rollback detection by 0xSherlokMo · Pull Request #3919 · sqlc-dev/sqlc
X Title: fix(migrations): case-sensitive migration rollback detection by 0xSherlokMo · Pull Request #3919 · sqlc-dev/sqlc
Description: This PR fixes an issue where SQLC was failing to properly detect and remove rollback statements in migration files due to case sensitivity. Previously, SQLC only recognized uppercase Down in rollback statements (e.g., -- +goose Down), but migration tools like Goose have updated their documentation to use lowercase down (e.g., -- +goose down). The change makes the rollback statement detection case-insensitive by converting the statement to lowercase before checking, ensuring compatibility with: Both -- +goose Down and -- +goose down (Goose migrations) Both -- +migrate Down and -- +migrate down (sql-migrate) Case variations in other migration tool formats This maintains backward compatibility with existing migrations while supporting the current documentation standards of migration tools. Fixes issue #3444 Changes Modified RemoveRollbackStatements to perform case-insensitive comparison by converting statements to lowercase before checking Maintains support for all existing migration tool formats: Goose sql-migrate tern dbmate Testing Verified that both uppercase and lowercase rollback statements are properly detected and removed Ensures no breaking changes for existing migration files
Open Graph Description: This PR fixes an issue where SQLC was failing to properly detect and remove rollback statements in migration files due to case sensitivity. Previously, SQLC only recognized uppercase Down in rollba...
X Description: This PR fixes an issue where SQLC was failing to properly detect and remove rollback statements in migration files due to case sensitivity. Previously, SQLC only recognized uppercase Down in rollba...
Opengraph URL: https://github.com/sqlc-dev/sqlc/pull/3919
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:98508d66-e396-5f03-039e-54218e4968a5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E3D0:13DDC4:8677F4A:BBF8D06:6A5064D5 |
| html-safe-nonce | f9b2249cdf5242ab473ec0143d9d263635a21cc476509965f65f8d8a440a8956 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0QwOjEzRERDNDo4Njc3RjRBOkJCRjhEMDY6NkE1MDY0RDUiLCJ2aXNpdG9yX2lkIjoiNjU3MjQ0ODEyOTY4MDk1ODY3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 352d3fcbaa93a4978f2b27a9018a915e0b7db647135d0b19f3293fbd0ea4593f |
| hovercard-subject-tag | pull_request:2437715027 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/sqlc-dev/sqlc/pull/3919/files |
| twitter:image | https://avatars.githubusercontent.com/u/108228340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/108228340?s=400&v=4 |
| og:image:alt | This PR fixes an issue where SQLC was failing to properly detect and remove rollback statements in migration files due to case sensitivity. Previously, SQLC only recognized uppercase Down in rollba... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width