task h.1 adn fix permission

This commit is contained in:
phaichayon
2026-06-16 15:13:14 +07:00
parent 9ae41e4f2c
commit 90ee59d388
29 changed files with 3807 additions and 119 deletions

View File

@@ -3,7 +3,7 @@ CREATE TABLE "memberships" (
"user_id" text NOT NULL,
"organization_id" text NOT NULL,
"role" text DEFAULT 'user' NOT NULL,
"business_role" text DEFAULT 'viewer' NOT NULL,
"business_role" text DEFAULT 'sales_support' NOT NULL,
"permissions" text[] DEFAULT '{}' NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
@@ -45,4 +45,4 @@ CREATE TABLE "users" (
);
--> statement-breakpoint
CREATE UNIQUE INDEX "organizations_slug_idx" ON "organizations" USING btree ("slug");--> statement-breakpoint
CREATE UNIQUE INDEX "users_email_idx" ON "users" USING btree ("email");
CREATE UNIQUE INDEX "users_email_idx" ON "users" USING btree ("email");