chore: update annotation comments (#478)

pull/480/head
Michael Fridman 2023-03-13 09:19:48 -04:00 committed by GitHub
parent 99204d2421
commit 33106fc6f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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!

View File

@ -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.