├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── README.md ├── db.go ├── gomigrate.go ├── gomigrate_test.go ├── migration.go ├── test_migrations ├── test1_mysql │ ├── 1_test_down.sql │ └── 1_test_up.sql ├── test1_pg │ ├── 1_test_down.sql │ ├── 1_test_up.sql │ ├── 2_create_index_function_if_not_exists_down.sql │ ├── 2_create_index_function_if_not_exists_up.sql │ ├── 3_multiple_inserts_down.sql │ ├── 3_multiple_inserts_up.sql │ ├── 4_dash-test_down.sql │ └── 4_dash-test_up.sql └── test1_sqlite3 │ ├── 1_test_down.sql │ └── 1_test_up.sql └── utils.go /.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | 3 | /.idea 4 | /gomigrate.iml 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/README.md -------------------------------------------------------------------------------- /db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/db.go -------------------------------------------------------------------------------- /gomigrate.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/gomigrate.go -------------------------------------------------------------------------------- /gomigrate_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/gomigrate_test.go -------------------------------------------------------------------------------- /migration.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/migration.go -------------------------------------------------------------------------------- /test_migrations/test1_mysql/1_test_down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/test_migrations/test1_mysql/1_test_down.sql -------------------------------------------------------------------------------- /test_migrations/test1_mysql/1_test_up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/test_migrations/test1_mysql/1_test_up.sql -------------------------------------------------------------------------------- /test_migrations/test1_pg/1_test_down.sql: -------------------------------------------------------------------------------- 1 | drop table if exists test; 2 | -------------------------------------------------------------------------------- /test_migrations/test1_pg/1_test_up.sql: -------------------------------------------------------------------------------- 1 | create table if not exists test(); 2 | -------------------------------------------------------------------------------- /test_migrations/test1_pg/2_create_index_function_if_not_exists_down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/test_migrations/test1_pg/2_create_index_function_if_not_exists_down.sql -------------------------------------------------------------------------------- /test_migrations/test1_pg/2_create_index_function_if_not_exists_up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/test_migrations/test1_pg/2_create_index_function_if_not_exists_up.sql -------------------------------------------------------------------------------- /test_migrations/test1_pg/3_multiple_inserts_down.sql: -------------------------------------------------------------------------------- 1 | drop table tt; 2 | -------------------------------------------------------------------------------- /test_migrations/test1_pg/3_multiple_inserts_up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/test_migrations/test1_pg/3_multiple_inserts_up.sql -------------------------------------------------------------------------------- /test_migrations/test1_pg/4_dash-test_down.sql: -------------------------------------------------------------------------------- 1 | select 1; 2 | -------------------------------------------------------------------------------- /test_migrations/test1_pg/4_dash-test_up.sql: -------------------------------------------------------------------------------- 1 | select 1; 2 | -------------------------------------------------------------------------------- /test_migrations/test1_sqlite3/1_test_down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE test; 2 | -------------------------------------------------------------------------------- /test_migrations/test1_sqlite3/1_test_up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE test ( 2 | id INTEGER PRIMARY KEY 3 | ) 4 | -------------------------------------------------------------------------------- /utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHuie/gomigrate/HEAD/utils.go --------------------------------------------------------------------------------