mirror of https://github.com/pressly/goose.git
Update `NO TRANSACTIONS` to `NO TRANSACTION`
parent
fa8806ecfd
commit
a515c0b5b9
|
@ -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.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- +goose NO TRANSACTIONS --
|
||||
-- +goose NO TRANSACTION
|
||||
-- +goose Up
|
||||
CREATE TABLE post (
|
||||
id int NOT NULL,
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue