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

Document down migrations #1306

Open
felixwatts opened this issue Jul 5, 2021 · 4 comments
Open

Document down migrations #1306

felixwatts opened this issue Jul 5, 2021 · 4 comments

Comments

@felixwatts
Copy link

sqlx migrate revert --help states Revert the latest migration with a down file but its not clear what a "down file" is.

It would be helpful to either document the usage of down migrations (in README and in CLI?) or to implement #356 or both.

@jplatte
Copy link
Contributor

jplatte commented Jul 5, 2021

#356 should be closed, sqlx migrate add already has a -r flag to create a set of up / down migrations.

@mammothcoding
Copy link

sqlx migrate -r add create_main_table
error: unexpected argument '-r' found

@nukiro
Copy link

nukiro commented Dec 31, 2024

@mammothcoding

sqlx migrate -r add create_main_table error: unexpected argument '-r' found

Usage: sqlx migrate add [OPTIONS]

sqlx migrate add -r create_users_table creates two files: 20241231141112_create_users_table.up.sql and 20241231141112_create_users_table.down.sql.

sqlx migrate run executes "up" files and sqlx migrate revert executes "down" ones.

@mammothcoding
Copy link

@mammothcoding

sqlx migrate -r add create_main_table error: unexpected argument '-r' found

Usage: sqlx migrate add [OPTIONS]

sqlx migrate add -r create_users_table creates two files: 20241231141112_create_users_table.up.sql and 20241231141112_create_users_table.down.sql.

sqlx migrate run executes "up" files and sqlx migrate revert executes "down" ones.

Don't work :(

sqlx migrate add -r create_main_table
Creating migrations/20250101152639_create_main_table.sql

sqlx = "0.8.2"
sqlx-cli = "0.8.2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants