weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
610 stars 85 forks source link

make sql file can turn off transaction #133

Open taojoe opened 5 years ago

taojoe commented 5 years ago

when an sql file starts with "--transaction-off", means turn transaction off. and print every sql when migrate.

weavejester commented 5 years ago

Thank you for the PR, however I'd rather we didn't add more special meaning to the filename. I'd consider implementing this as a specially-formatted comment but I'd need to think about it.

Also commit messages should be written in English and according to the contributing guidelines, and the commits should pass CI.

taojoe commented 5 years ago

it's not file name, it's file content starts with.

weavejester commented 5 years ago

Sorry, I misunderstood you previously. I think I'd prefer a comment like -- transactions: off, but it should be matched case insensitively and ignore whitespace and previous comments. I think we should also allow off, false, no, true, on and yes as valid values, similar to YAML.