apstanisic / zmaj

Zmaj is a headless CMS for managing database
https://zmaj.vercel.app
MIT License
5 stars 0 forks source link

Dynamic migrations #19

Open apstanisic opened 1 year ago

apstanisic commented 1 year ago

Not enabled, since not all edge cases are finished, but it's implemented

When schema is changed by app, it creates migration in db with up and down commands. Commands are json array that contains steps that were taken to change database. We can run these migrations to get full schema. Problem is, that those migrations does not contain info about collections, fields, relations. So user still have to copy db tables. But it provides easier way to sync between dev and prod

apstanisic commented 1 year ago

There should be easy way to put them in prod server, maybe download them, and have both cli that accepts json file with migrations, and as api param that will create them in db and store them with commands