File tree Expand file tree Collapse file tree 2 files changed +9
-30
lines changed
src/main/resources/db/migration Expand file tree Collapse file tree 2 files changed +9
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- -- Soft deletion support for Target table
2- alter table Target add column deleted boolean default false;
3-
4- -- Clean up discovery nodes and targets for fresh start with soft deletion
5- delete from DiscoveryNode where nodeType not in (' Universe' , ' Realm' );
6- delete from Target where true;
7-
8- -- Drop constraints to allow soft deletion to work properly
9- alter table Target drop constraint FKl0dhd7qeayg54dcoblpww6x34;
10- alter table Target drop constraint target_connecturl_key;
11-
121-- Quarkus Quartz setup so that scheduled jobs, triggers, etc. are persisted in
132-- the database and can survive application restarts
143-- https://github.com/quartz-scheduler/quartz/blob/2a97f397949ec58fc980a661fd2930213b29d77b/quartz/src/main/resources/org/quartz/impl/jdbcjobstore/tables_postgres.sql
@@ -212,5 +201,13 @@ CREATE INDEX IDX_QRTZ_FT_T_G
212201CREATE INDEX IDX_QRTZ_FT_TG
213202 ON QRTZ_FIRED_TRIGGERS (SCHED_NAME, TRIGGER_GROUP);
214203
204+ alter table Target
205+ add column deleted timestamp default null ;
206+
207+ delete from DiscoveryNode where nodeType not in (' Universe' , ' Realm' );
208+ delete from Target where true;
209+
210+ alter table Target drop constraint FKl0dhd7qeayg54dcoblpww6x34;
211+ alter table Target drop constraint target_connecturl_key;
215212
216- COMMIT ;
213+ COMMIT ;
You can’t perform that action at this time.
0 commit comments