erikbra / grate

grate - the SQL scripts migration runner
MIT License
165 stars 36 forks source link

Question - How to mark one-time migration as run #546

Closed mattjones0111 closed 1 week ago

mattjones0111 commented 2 weeks ago

When applying grate to an existing codebase which already has an established schema, I'd like to create an 'initial state' migration which contains the schema creation up to that point, but not actually run it at the next deploy. How do I create a migration but mark it as already executed?

erikbra commented 2 weeks ago

That would be exactly what the --baseline switch does

https://erikbra.github.io/grate/configuration-options/

mattjones0111 commented 1 week ago

Ah. It helps to RTFM I guess. Thank you for the pointer.

erikbra commented 1 week ago

The manual IS a bit F here and there, and not always as easy as it should be to understand. If you have some suggestions, they are more than welcome! Glad you're helped!