Skip to content

Commit 43e2d38

Browse files
committed
rebase fixup
1 parent 2e70e8b commit 43e2d38

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

src/main/resources/db/migration/V4.1.0__cryostat.sql

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/main/resources/db/migration/V4.2.0__cryostat.sql

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
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
212201
CREATE 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;

0 commit comments

Comments
 (0)