Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage: update migrations readme #3145

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions storage/sql_migrations/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
This directory contains SQL schema migrations, run at startup of the node.

Refer to https://github.com/amacneil/dbmate on how to write migrations.
Refer to https://pressly.github.io/goose/ on how to write migrations.

Files should be named according to the following: `<number>_<short engine name>_<table/feature name>.sql`.
For instance: `002_usecase_list.sql`. Each file should contain `-- migrate:up` and `-- migrate:down`
Files should be named according to the following: `<number>_<table/feature name>.sql`.
For instance: `002_usecase_list.sql`. Each file should contain `-- +goose Up` and `-- +goose Down`

AVOID changing migrations in master (unless the migration breaks the node horribly) for those running a `master` version.
DO NOT alter migrations in a released version: it might break vendor deployments or cause data corruption.
Expand Down
Loading