You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created migrations through the goose create command.
The migration files are created in the datetime_name.sql format.
When I run the goose validate command, nothing happens.
Example file.sql (sql query was specifically written with an error):
if you break annotation (for example, gooseStatementBegin instead of goose StatementBegin), a message will be displayed in the terminal: 2023/12/18 15:52:16 goose validate: failed to parse file "20231215150001_add_test_options.sql": '-- +goose StatementEnd' must be defined after '-- +goose StatementBegin', see https://github.com/pressly/goose#sql-migrations
The description of the command states: "Check migration files without running them"
however, no validation actually takes place.
The text was updated successfully, but these errors were encountered:
The validate command doesn't validate sql queries, only that the file is not malformed.
We should probably update the description to explicitly state that.
There's an opportunity here to spin up an ephemeral database and apply all migrations to exercise sql queries against a "real" database. But this isn't supported yet.
goose version: v3.16.0
I have created migrations through the
goose create
command.The migration files are created in the datetime_name.sql format.
When I run the
goose validate
command, nothing happens.Example file.sql (sql query was specifically written with an error):
if you break annotation (for example,
gooseStatementBegin
instead ofgoose StatementBegin
), a message will be displayed in the terminal:2023/12/18 15:52:16 goose validate: failed to parse file "20231215150001_add_test_options.sql": '-- +goose StatementEnd' must be defined after '-- +goose StatementBegin', see https://github.com/pressly/goose#sql-migrations
The description of the command states: "Check migration files without running them"
however, no validation actually takes place.
The text was updated successfully, but these errors were encountered: