mirror of https://github.com/pressly/goose.git
chore: update annotation comments (#478)
parent
99204d2421
commit
33106fc6f2
|
@ -253,14 +253,14 @@ var sqlMigrationTemplate = template.Must(template.New("goose.sql-migration").Par
|
|||
--
|
||||
-- A single goose .sql file holds both Up and Down migrations.
|
||||
--
|
||||
-- All goose .sql files are expected to have a -- +goose Up directive.
|
||||
-- The -- +goose Down directive is optional, but recommended, and must come after the Up directive.
|
||||
-- All goose .sql files are expected to have a -- +goose Up annotation.
|
||||
-- The -- +goose Down annotation is optional, but recommended, and must come after the Up annotation.
|
||||
--
|
||||
-- The -- +goose NO TRANSACTION directive may be added to the top of the file to run statements
|
||||
-- The -- +goose NO TRANSACTION annotation may be added to the top of the file to run statements
|
||||
-- outside a transaction. Both Up and Down migrations within this file will be run without a transaction.
|
||||
--
|
||||
-- More complex statements that have semicolons within them must be annotated with
|
||||
-- the -- +goose StatementBegin and -- +goose StatementEnd directives to be properly recognized.
|
||||
-- the -- +goose StatementBegin and -- +goose StatementEnd annotations to be properly recognized.
|
||||
--
|
||||
-- Use GitHub issues for reporting bugs and requesting features, enjoy!
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
// starting with "-- +goose" to specify whether the section should
|
||||
// be applied during an Up or Down migration
|
||||
//
|
||||
// All statements following an Up or Down directive are grouped together
|
||||
// until another direction directive is found.
|
||||
// All statements following an Up or Down annotation are grouped together
|
||||
// until another direction is found.
|
||||
func runSQLMigration(db *sql.DB, statements []string, useTx bool, v int64, direction bool, noVersioning bool) error {
|
||||
if useTx {
|
||||
// TRANSACTION.
|
||||
|
|
Loading…
Reference in New Issue