sqlr icon indicating copy to clipboard operation
sqlr copied to clipboard

Diff and patch for schemas?

Open krlmlr opened this issue 5 years ago • 0 comments

When the schema evolves, how do I apply the update to an existing database?

Use case: I have a script that creates the database from scratch, I've used it to create an instance and I have added data to that instance. Now the schema needs an update. Can I update the schema and keep the existing data in the database, and still have a comprehensive definition of the schema using the sqlr DSL?

Might be easier to achieve with #5.

Important cases:

  • [ ] New column
  • [ ] Renamed column
  • [ ] New table
  • [ ] Removed column (with warning)

Other cases:

  • [ ] Splitting a table
  • [ ] Changing semantics of a column (with a migration rule)

krlmlr avatar Sep 03 '18 09:09 krlmlr