task-l.1
This commit is contained in:
19
drizzle/0014_bored_valkyrie.sql
Normal file
19
drizzle/0014_bored_valkyrie.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE TABLE "crm_user_role_assignments" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"organization_id" text NOT NULL,
|
||||
"user_id" text NOT NULL,
|
||||
"role_profile_id" text NOT NULL,
|
||||
"branch_scope_mode" text DEFAULT 'inherit' NOT NULL,
|
||||
"branch_scope_ids" text[] DEFAULT '{}' NOT NULL,
|
||||
"product_type_scope_mode" text DEFAULT 'inherit' NOT NULL,
|
||||
"product_type_scope_ids" text[] DEFAULT '{}' NOT NULL,
|
||||
"is_primary" boolean DEFAULT false NOT NULL,
|
||||
"is_active" boolean DEFAULT true NOT NULL,
|
||||
"assigned_by" text NOT NULL,
|
||||
"assigned_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"deleted_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "crm_user_role_assignments_org_user_role_idx" ON "crm_user_role_assignments" USING btree ("organization_id","user_id","role_profile_id");
|
||||
20
drizzle/0014_crm_user_role_assignments.sql
Normal file
20
drizzle/0014_crm_user_role_assignments.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
CREATE TABLE IF NOT EXISTS "crm_user_role_assignments" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"organization_id" text NOT NULL,
|
||||
"user_id" text NOT NULL,
|
||||
"role_profile_id" text NOT NULL,
|
||||
"branch_scope_mode" text DEFAULT 'inherit' NOT NULL,
|
||||
"branch_scope_ids" text[] DEFAULT '{}' NOT NULL,
|
||||
"product_type_scope_mode" text DEFAULT 'inherit' NOT NULL,
|
||||
"product_type_scope_ids" text[] DEFAULT '{}' NOT NULL,
|
||||
"is_primary" boolean DEFAULT false NOT NULL,
|
||||
"is_active" boolean DEFAULT true NOT NULL,
|
||||
"assigned_by" text NOT NULL,
|
||||
"assigned_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"deleted_at" timestamp with time zone
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "crm_user_role_assignments_org_user_role_idx"
|
||||
ON "crm_user_role_assignments" ("organization_id", "user_id", "role_profile_id");
|
||||
3580
drizzle/meta/0014_snapshot.json
Normal file
3580
drizzle/meta/0014_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -99,6 +99,13 @@
|
||||
"when": 1782097963376,
|
||||
"tag": "0013_great_nicolaos",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 14,
|
||||
"version": "7",
|
||||
"when": 1782099743528,
|
||||
"tag": "0014_bored_valkyrie",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user