rdagumampan / yuniql

Free and open source schema versioning and database migration made natively with .NET/6. NEW THIS MAY 2022! v1.3.15 released!
https://yuniql.io
Apache License 2.0
417 stars 63 forks source link

Document working with existing databases #282

Open rdagumampan opened 2 years ago

rdagumampan commented 2 years ago

@rioka Thanks for reaching out and apologies for the delay... Summer time in EU :). Its our backlog to write up a documentation for baselining existing database. Hmmm, I think what you can do is to create v0.00 with just simple script like init.sql and a --This is baseline database version statement. Execute this in your staging and production. This will establish the needed tracking tables in the database. Then you can add all the baseline script files in v0.00 and execute first time in dev and test. This enable you to hold all baseline scripts in v0.00 and get skipped in staging and production.

This is still hackish or work around. Sounds like yuniql rebase which is what we need here...

Originally posted by @rdagumampan in https://github.com/rdagumampan/yuniql/issues/280#issuecomment-1217053198