Skip to content

Commit 29a6ce2

Browse files
query number changed (#4163)
1 parent 2f19628 commit 29a6ce2

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
BEGIN;
2+
-- drop tables
3+
DROP TABLE IF EXISTS resource_filter_audit;
4+
DROP TABLE IF EXISTS resource_filter_evaluation_audit;
5+
-- drop sequences
6+
DROP SEQUENCE IF EXISTS public.resource_filter_audit_seq;
7+
DROP SEQUENCE IF EXISTS public.resource_filter_evaluation_audit_seq;
8+
COMMIT;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
BEGIN;
2+
-- create resource filter audit table
3+
CREATE SEQUENCE IF NOT EXISTS resource_filter_audit_seq;
4+
CREATE TABLE IF NOT EXISTS "public"."resource_filter_audit"
5+
(
6+
"id" integer not null default nextval('resource_filter_audit_seq' :: regclass),
7+
"target_object" integer NOT NULL,
8+
"conditions" text NOT NULL,
9+
"filter_id" int NOT NULL,
10+
"action" int NOT NULL,
11+
"created_on" timestamptz,
12+
"created_by" integer,
13+
"updated_on" timestamptz,
14+
"updated_by" integer,
15+
CONSTRAINT "resource_filter_audit_filter_id_fkey" FOREIGN KEY ("filter_id") REFERENCES "public"."resource_filter" ("id"),
16+
PRIMARY KEY ("id")
17+
);
18+
19+
-- create resource filter evaluation audit table
20+
CREATE SEQUENCE IF NOT EXISTS resource_filter_evaluation_audit_seq;
21+
CREATE TABLE IF NOT EXISTS "public"."resource_filter_evaluation_audit"
22+
(
23+
"id" integer not null default nextval('resource_filter_evaluation_audit_seq' :: regclass),
24+
"reference_type" integer NOT NULL,
25+
"reference_id" integer NOT NULL,
26+
"filter_history_objects" text NOT NULL,
27+
"subject_type" int NOT NULL,
28+
"subject_id" int NOT NULL,
29+
"created_on" timestamptz,
30+
"created_by" integer,
31+
"updated_on" timestamptz,
32+
"updated_by" integer,
33+
PRIMARY KEY ("id")
34+
);
35+
COMMIT;
File renamed without changes.

0 commit comments

Comments
 (0)