Skip to content

internal/dinosql: ignore golang-migrate rollbacks#320

Merged
kyleconroy merged 1 commit intosqlc-dev:masterfrom
treuherz:golang-migrate
Feb 6, 2020
Merged

internal/dinosql: ignore golang-migrate rollbacks#320
kyleconroy merged 1 commit intosqlc-dev:masterfrom
treuherz:golang-migrate

Conversation

@treuherz
Copy link
Contributor

@treuherz treuherz commented Feb 6, 2020

We use golang-migrate for migration management, and would like to be able to use it with sqlc. The obstacle here is that it doesn't indicate up/down migrations through special comments, but by naming the SQL files things like

1481574547_create_users_table.up.sql
1481574547_create_users_table.down.sql

so I've had to put the check in ReadSQLFiles and test the functionality differently.

Let me know if you'd like any of this done differently, I'm happy to keep tweaking it.

@kyleconroy kyleconroy merged commit 8601eec into sqlc-dev:master Feb 6, 2020
@kyleconroy
Copy link
Collaborator

@treuherz Thanks! Especially for the tests

@treuherz
Copy link
Contributor Author

treuherz commented Feb 7, 2020

Happy to contribute, thanks for the speedy merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants