Skip to content

Commit

Permalink
Add DB Migration for AT Job ID
Browse files Browse the repository at this point in the history
Add the AT Job ID to the database.
  • Loading branch information
jekhokie committed Mar 29, 2021
1 parent e4e9f20 commit e33c925
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db_migrations/09_add_at_job_id.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE predict_passes
ADD COLUMN at_job_id int not null default 0;
9 changes: 9 additions & 0 deletions db_migrations/update_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,13 @@ else
log " - ${script} already applied" "INFO"
fi

script="09_add_at_job_id.sql"
check=$($SQL_CMD $NOAA_HOME/db/panel.db ".schema predict_passes" | grep 'at_job_id')
if [ -z "${check}" ]; then
log " - applying ${script}" "INFO"
$SQL_CMD $NOAA_HOME/db/panel.db < $NOAA_HOME/db_migrations/$script
else
log " - ${script} already applied" "INFO"
fi

log "Schema updates complete!" "INFO"

0 comments on commit e33c925

Please sign in to comment.