Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions drizzle/0013_fuzzy_leader.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE "web_associations" (
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "web_associations_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
"name" text NOT NULL,
"description_it" text NOT NULL,
"description_en" text NOT NULL,
"logo_svg" text,
"created_by_id" bigint NOT NULL,
"modified_by_id" bigint,
"updated_at" timestamp (0) with time zone,
"created_at" timestamp (0) with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "web_associations" ADD CONSTRAINT "web_associations_created_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("created_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_associations" ADD CONSTRAINT "web_associations_modified_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("modified_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;
46 changes: 46 additions & 0 deletions drizzle/0014_lucky_blacklash.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
CREATE TABLE "web_faq_categories" (
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "web_faq_categories_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
"title_it" text NOT NULL,
"title_en" text NOT NULL,
"icon" text,
"created_by_id" bigint NOT NULL,
"modified_by_id" bigint,
"updated_at" timestamp (0) with time zone,
"created_at" timestamp (0) with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "web_faqs" (
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "web_faqs_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
"title_it" text NOT NULL,
"title_en" text NOT NULL,
"description_it" text NOT NULL,
"description_en" text NOT NULL,
"category_id" integer NOT NULL,
"created_by_id" bigint NOT NULL,
"modified_by_id" bigint,
"updated_at" timestamp (0) with time zone,
"created_at" timestamp (0) with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "web_projects" (
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "web_projects_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
"title" text NOT NULL,
"description_it" text NOT NULL,
"description_en" text NOT NULL,
"logo" text,
"link" text,
"category" text DEFAULT 'general' NOT NULL,
"order" integer DEFAULT 0 NOT NULL,
"created_by_id" bigint NOT NULL,
"modified_by_id" bigint,
"updated_at" timestamp (0) with time zone,
"created_at" timestamp (0) with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "web_faq_categories" ADD CONSTRAINT "web_faq_categories_created_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("created_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_faq_categories" ADD CONSTRAINT "web_faq_categories_modified_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("modified_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_faqs" ADD CONSTRAINT "web_faqs_category_id_web_faq_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."web_faq_categories"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_faqs" ADD CONSTRAINT "web_faqs_created_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("created_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_faqs" ADD CONSTRAINT "web_faqs_modified_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("modified_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_projects" ADD CONSTRAINT "web_projects_created_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("created_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "web_projects" ADD CONSTRAINT "web_projects_modified_by_id_tg_permissions_user_id_fk" FOREIGN KEY ("modified_by_id") REFERENCES "public"."tg_permissions"("user_id") ON DELETE no action ON UPDATE no action;
1 change: 1 addition & 0 deletions drizzle/0015_kind_micromacro.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "web_associations" RENAME COLUMN "logo_svg" TO "logo";
Loading