migrate
migrate copied to clipboard
Needs a description of what it does at the top of the readme
I've heard great things about this package and I was told I might need it. So I read the README and I found that it does DB migration but what does that mean? Migrate from one DB instance to another, or one type of DB to a different type, or a particular version of a specific DB to a different version of the same DB?
Reading the readme further, I just became more confused - about migration sources and up and down migrations.... Just noticed the FAQ.md file (didn't spot after scanning the root directory files several times) - maybe need a link to FAQ in the README.md. But the FAQ did not really clarify much for me.
Maybe someone could add just a simple scenario or two of a typical usage(s).
Haha, your friend should have told you why this package might be useful 😉
More seriously, to answer your question, this package allows you to manage your database schema changes (mostly for RDBMSs that are compatible with database/sql but we also supported dbs that have their own query language). This allows you to more safely create/drop/alter tables/columns/indices to keep your application data schema in sync with your database schema.
Have you seen the tutorials?
You're correct in that the documentation could be better organized. Right now, the content is scattered and it's hard to browse, navigate, and search. It may be worth moving the docs to a wiki or its own site. I thought I had an issue for this but I can't find it 😞 The docs also don't go over terminology or concepts, making it hard for people learn. It'd be great if you could help out improve our docs! 🙏 In my past experience w/ GitHub wikis, search and navigation were still a problem so I lean towards creating our docs page via Hugo and GitHub pages. But creating our own docs is a lot more work than migrating to GitHub wiki, so I'm ok with migrating to GitHub wiki in the short-to-medium term.
Thank you for the great package and more instructions. I have the same question as op but specific:
a particular version of a specific DB to a different version of the same DB?
The use case is that I am working on desktop software which has own database on local machine. Do I need check the version of the database or just run all xxx.sql one time when there is update(https://github.com/golang-migrate/migrate/blob/master/database/postgres/README.md#upgrading-from-v1)?
I have impression of EF of Microsoft, https://docs.microsoft.com/en-us/ef/core/ EF core has similar up/down logic to handle the migration. The difference may be EF has a table(the migrations history table,https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/history-table) on each database to record the change. I don't know whether this package has the similar tracking? or I need track by myself e.g. an ini file to record version number?
Thank you.