CREATE TABLE "subModules" (
	"submodule_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
	"moduleName" text NOT NULL,
	"name" text NOT NULL,
	"description" text,
	"link" text NOT NULL,
	"active" boolean DEFAULT false,
	"roles" jsonb DEFAULT '["systemAdmin"]'::jsonb NOT NULL,
	"subSubModule" jsonb DEFAULT '[]'::jsonb,
	"add_User" text DEFAULT 'LST_System' NOT NULL,
	"add_Date" timestamp DEFAULT now(),
	"upd_User" text DEFAULT 'LST_System' NOT NULL,
	"upd_date" timestamp DEFAULT now()
);
--> statement-breakpoint
ALTER TABLE "subModules" ADD CONSTRAINT "subModules_moduleName_modules_name_fk" FOREIGN KEY ("moduleName") REFERENCES "public"."modules"("name") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "subModule_name" ON "subModules" USING btree ("name");