feat: implement policy engine and recovery incident modules with evaluation logic and database schema
This commit is contained in:
+7
-1
@@ -577,7 +577,6 @@ CREATE TABLE IF NOT EXISTS policy_engine.tbl_policies (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
"tenantId" UUID NOT NULL REFERENCES tenant.tbl_tenants(id) ON DELETE CASCADE,
|
||||
policy_name VARCHAR(200) NOT NULL,
|
||||
jurisdiction_id UUID REFERENCES masters_lookup.tbl_jurisdictions(id) ON DELETE SET NULL,
|
||||
description TEXT,
|
||||
status VARCHAR NOT NULL DEFAULT 'draft',
|
||||
version INT NOT NULL DEFAULT 1,
|
||||
@@ -588,6 +587,13 @@ CREATE TABLE IF NOT EXISTS policy_engine.tbl_policies (
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS policy_engine.tbl_policy_jurisdictions (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
policy_id UUID NOT NULL REFERENCES policy_engine.tbl_policies(id) ON DELETE CASCADE,
|
||||
jurisdiction_id UUID NOT NULL REFERENCES masters_lookup.tbl_jurisdictions(id) ON DELETE CASCADE,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS policy_engine.tbl_policy_target_audiences (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
policy_id UUID NOT NULL REFERENCES policy_engine.tbl_policies(id) ON DELETE CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user