Skip to content

Commit

Permalink
ensure temporary table does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
dmjb committed Aug 8, 2024
1 parent 695d7f1 commit 690ef7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions database/migrations/000089_migrate_rule_statuses.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,8 @@ UPDATE rule_evaluations
SET migrated = TRUE
WHERE id IN (SELECT rule_evaluation_id FROM temp_migrate_rule_evaluations);

-- this is not strictly necessary, but if we don't do it - sqlc will generate
-- a model for the temporary table :(
DROP TABLE IF EXISTS temp_migrate_rule_evaluations;

COMMIT;
5 changes: 0 additions & 5 deletions internal/db/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 690ef7b

Please sign in to comment.