Skip to content

Commit

Permalink
Delete Previously Existing Tables if Created from old SQLAlchemy migr…
Browse files Browse the repository at this point in the history
…ations (#423)
  • Loading branch information
jyono authored Feb 10, 2024
1 parent 5ae1cd7 commit 7cc37d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
20 changes: 10 additions & 10 deletions migrations/sql/00000001_initialize_schema.down.sql
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
drop table metric;
drop table metric cascade;

drop table confusion_matrix;
drop table confusion_matrix cascade;

drop table evaluation;
drop table evaluation cascade;

drop table groundtruth;
drop table groundtruth cascade;

drop table prediction;
drop table prediction cascade;

drop table label;
drop table label cascade;

drop table annotation;
drop table annotation cascade;

drop table model;
drop table model cascade;

drop table datum;
drop table datum cascade;

drop table dataset;
drop table dataset cascade;
12 changes: 11 additions & 1 deletion migrations/sql/00000001_initialize_schema.up.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
create extension if not exists "postgis";
create extension if not exists "postgis_raster";

drop table if exists metric cascade;
drop table if exists confusion_matrix cascade;
drop table if exists evaluation cascade;
drop table if exists groundtruth cascade;
drop table if exists prediction cascade;
drop table if exists label cascade;
drop table if exists annotation cascade;
drop table if exists model cascade;
drop table if exists datum cascade;
drop table if exists dataset cascade;

create table label
(
id serial
Expand Down Expand Up @@ -189,4 +200,3 @@ create table prediction

create index ix_prediction_id
on prediction (id);

0 comments on commit 7cc37d1

Please sign in to comment.