@ff00ff/mammoth-clicommand line interface. You can execute your migrations using this interface, but you can also generate migrations based on changes to your tables. This saves you from repeating yourself repeating yourself!
mammoth nextgenerates your next migration based on your defined tables and any existing migrations
mammoth migrateapplies the migrations to your database
999(at some point you can squash them). Migrations are written in pure SQL.
mammoth nextthis automatically creates
migrations/001.sqlfor you with the below contents.
mammoth nextit will automatically generate the next migration file for you. For example: I add a new column
mammoth nextagain. This generates
migrations/002.sqlfor me with the below contents.
mammoth migrate. This executes the migrations in order one-by-one. Once a migration is applied, Mammoth stores this data in the
migrationtable in your database, together with a checksum of the migration. You must not edit a migration after it has been applied.