dashboard/migration
2022-11-07 00:49:22 +01:00
..
src feat: db migration to remove query_x and query_y 2022-11-07 00:49:22 +01:00
Cargo.toml fix: postgres issues 2022-11-01 18:12:32 +01:00
README.md feat!: async refactor 2022-10-31 02:54:42 +01:00

Running Migrator CLI

  • Generate a new migration file
    cargo run -- migrate generate MIGRATION_NAME
    
  • Apply all pending migrations
    cargo run
    
    cargo run -- up
    
  • Apply first 10 pending migrations
    cargo run -- up -n 10
    
  • Rollback last applied migrations
    cargo run -- down
    
  • Rollback last 10 applied migrations
    cargo run -- down -n 10
    
  • Drop all tables from the database, then reapply all migrations
    cargo run -- fresh
    
  • Rollback all applied migrations, then reapply all migrations
    cargo run -- refresh
    
  • Rollback all applied migrations
    cargo run -- reset
    
  • Check the status of all migrations
    cargo run -- status