goose/examples/sql-migrations
Dongri Jin 7bc1756c61
Fix install command (#289)
2021-11-24 10:00:49 -05:00
..
00001_create_users_table.sql Examples structure refactor 2017-06-20 12:53:59 -04:00
00002_rename_root.sql Examples structure refactor 2017-06-20 12:53:59 -04:00
00003_no_transaction.sql Rename new example 2017-06-20 15:16:02 -04:00
README.md Fix install command (#289) 2021-11-24 10:00:49 -05:00

README.md

SQL migrations only

See this example for Go migrations.

$ go install github.com/pressly/goose/v3/cmd/goose@latest
$ goose sqlite3 ./foo.db status
    Applied At                  Migration
    =======================================
    Pending                  -- 00001_create_users_table.sql
    Pending                  -- 00002_rename_root.sql

$ goose sqlite3 ./foo.db up
OK    00001_create_users_table.sql
OK    00002_rename_root.sql
goose: no migrations to run. current version: 2

$ goose sqlite3 ./foo.db status
    Applied At                  Migration
    =======================================
    Mon Jun 19 21:56:00 2017 -- 00001_create_users_table.sql
    Mon Jun 19 21:56:00 2017 -- 00002_rename_root.sql