1 unstable release

0.1.0 Jul 15, 2023

#2779 in Database interfaces

Download history 3/week @ 2024-02-11 13/week @ 2024-02-18 28/week @ 2024-02-25 11/week @ 2024-03-03 18/week @ 2024-03-10 9/week @ 2024-03-17 17/week @ 2024-03-24 44/week @ 2024-03-31 6/week @ 2024-04-07 4/week @ 2024-04-14 10/week @ 2024-04-21

65 downloads per month
Used in 5 crates (via cronback-lib)

BSD-2-Clause-Patent

16KB
362 lines

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
    

Dependencies

~59MB
~1M SLoC