Created
April 15, 2015 14:42
-
-
Save benjaminreid/8bfe81be40b3c115ed71 to your computer and use it in GitHub Desktop.
migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(this will presume you have migrations table already created, e.g. CREATE TABLE schema_migrations (migrations TEXT);) | |
Migration 1. | |
key: foobar | |
up: CREATE TABLE table_name (column_1 INT); INSERT INTO schema_migrations (migrations) VALUES ('foobar'); | |
down: DROP TABLE table_name; DELETE FROM schema_migrations WHERE migrations = 'foobar'; | |
Migation 2. | |
....etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment