{"repo":"johngibb/migrate","free":true,"listed":false,"github":"https://github.com/johngibb/migrate","clone":"git clone https://github.com/johngibb/migrate.git","description":"Exceedingly simple Postgres migration tool","language":"Go","stars":18,"topics":["postgresql","migration","golang"],"license":"Unlicense","category":"databases-storage","readme_excerpt":"migrate Migrate is an exceedingly simple Postgres database migration tool. The simplicity is manifested in the following principles: There are no \"down\" migrations. Because migrations necessarily mutate state on a live server, you can't have a safe rollback button. Migrations are not automatically executed within a transaction. Transactions are expensive, often unnecessary, and prevent certain operations (e.g. create index concurrently ). If the migration warrants transactional semantics, simply include begin; ... ; commit; within the source of your migration. Migrations are not skipped if they are added out of order with regard to their version number, unlike some alternative tools. This handles the case where a migration is added in a feature branch, and no longer has the highest version number when merged into master. Install This will install migrate to your $GOPATH/bin directory. Usage Create a migration: View pending and applied migrations: Apply pending migrations: Migrations Migrations are written as plain SQL scripts. All statements should be terminated with a semicolon, as migrate will execute the script one statement at a time. A simple migration to add a users table might look like: A more complicated migration that uses a transaction to create multiple tables and build an index might look like: Development To run the full integration tests, you'll need to have Docker for Mac installed.","default_branch":null,"files":null,"tree":[],"storefront":"/r/johngibb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johngibb/migrate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}