karenc / db-migrator

GNU Affero General Public License v3.0
4 stars 5 forks source link

init assumes all steps already installed #34

Closed reedstrm closed 8 years ago

reedstrm commented 8 years ago

the 'init' command, if not given a timestamp, assumes 'now()' which effectively assumes all migrations have been applied. This is not correct for the case of first deployment of dbmigrator control to an existing instance of an existing schema. (If you follow), It is correct for a new instance.

karenc commented 8 years ago

init --version=0 is for that use case. Does it not work?

reedstrm commented 8 years ago

Right, but it's not documented in the README, or in the output that 'dbmigrator list' does on first run on a db. I keep forgetting about it.

karenc commented 8 years ago

@pumazi has written a gist (may also be in Connexions/cnx-deploy) for updating existing servers. Maybe we should use that instead of trying to do it from scratch each time.

https://gist.github.com/pumazi/132b349ec18c7cc08cb988b1a7d5c05d

I'll update README.

reedstrm commented 8 years ago

Right he even moved it to napkin-notes - https://github.com/openstax/napkin-notes/blob/master/pumazi/cnx/2016-apr-release.md

karenc commented 8 years ago

Updated README in #36