mirror of
https://github.com/pressly/goose.git
synced 2025-04-27 21:23:39 +00:00
Update NO TRANSACTIONS
to NO TRANSACTION
This commit is contained in:
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.
|
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.
|
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.
|
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
|
-- +goose Up
|
||||||
CREATE TABLE post (
|
CREATE TABLE post (
|
||||||
id int NOT NULL,
|
id int NOT NULL,
|
||||||
|
@ -134,7 +134,7 @@ func useTransactions(scriptFile string) bool {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
noTransactionsRegex, _ := regexp.Compile("--\\s\\+goose\\sNO\\sTRANSACTIONS")
|
noTransactionsRegex, _ := regexp.Compile("--\\s\\+goose\\sNO\\sTRANSACTION")
|
||||||
|
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user