Skip to content

Commit

Permalink
feat: add button to tilt UI to easily run db rollback if needed (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
omBratteng authored Mar 12, 2024
1 parent 1b31eea commit a8000fb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_daily_dir(app=""):

# Add a button to API to seed the database
cmd_button(
name="seed",
name="db_seed",
resource="api",
text="Seed Database",
icon_name="repartition",
Expand All @@ -19,10 +19,9 @@ cmd_button(
argv=["npm", "run", "db:seed:import"],
)


# Add a button to API to run db migrations
cmd_button(
name="migrate",
name="db_migrate",
resource="api",
text="Run database migrations",
icon_name="dns",
Expand All @@ -31,6 +30,17 @@ cmd_button(
argv=["npm", "run", "db:migrate:latest"],
)

# Add a button to API to run db rollback
cmd_button(
name="db_rollback",
resource="api",
text="Run database rollback",
icon_name="settings_backup_restore",
requires_confirmation=True,
dir=get_daily_dir("daily-api"),
argv=["npm", "run", "db:migrate:rollback"],
)

# Add a button to navbar to trigger pubsub fix
cmd_button(
name="fix_pubsub",
Expand Down

0 comments on commit a8000fb

Please sign in to comment.