Update `NO TRANSACTIONS` to `NO TRANSACTION`

pull/41/head
Nicholas Duffy 2017-05-06 13:39:52 -06:00
parent fa8806ecfd
commit a515c0b5b9
3 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ DROP TABLE post;
Notice the annotations in the comments. Any statements following `-- +goose Up` will be executed as part of a forward migration, and any statements following `-- +goose Down` will be executed as part of a rollback.
By default, all migrations are run within a transaction. Some statements like `CREATE DATABASE`, however, cannot be run within a transaction. You may optionally add `-- +goose NO TRANSACTIONS` to the top of your migration
By default, all migrations are run within a transaction. Some statements like `CREATE DATABASE`, however, cannot be run within a transaction. You may optionally add `-- +goose NO TRANSACTION` to the top of your migration
file in order to skip transactions within that specific migration file. Both Up and Down migrations within this file will be run without transactions.
By default, SQL statements are delimited by semicolons - in fact, query statements must end with a semicolon to be properly recognized by goose.

View File

@ -1,4 +1,4 @@
-- +goose NO TRANSACTIONS --
-- +goose NO TRANSACTION
-- +goose Up
CREATE TABLE post (
id int NOT NULL,

View File

@ -134,7 +134,7 @@ func useTransactions(scriptFile string) bool {
log.Fatal(err)
}
noTransactionsRegex, _ := regexp.Compile("--\\s\\+goose\\sNO\\sTRANSACTIONS")
noTransactionsRegex, _ := regexp.Compile("--\\s\\+goose\\sNO\\sTRANSACTION")
scanner := bufio.NewScanner(f)