Starting with versioning mysql schemata without overkill. Good solutions?

后端 未结 11 1737
感动是毒
感动是毒 2020-12-28 23:40

I\'ve arrived at the point where I realise that I must start versioning my database schemata and changes. I consequently read the existing posts on SO about that topic but I

11条回答
  •  隐瞒了意图╮
    2020-12-28 23:49

    i'd guess, a batch file like this should do the job (didn't try tough) ...

    mysqldump --no-data -ufoo -pbar dbname > path/to/app/schema.sql
    svn commit path/to/app/schema.sql

    just run the batch file after changing the schema, or let a cron/scheduler do it (but i don't know ... i think, commits work if just the timestamps changed, even if the contents is the same. don't know if that would be a problem.)

提交回复
热议问题