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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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" text NOT NULL,
"title_it" text NOT NULL,
"title_en" text NOT NULL,
"icon" text,
"created_by_id" bigint NOT NULL,
"modified_by_id" bigint,
Expand All @@ -10,17 +11,36 @@ CREATE TABLE "web_faq_categories" (
--> 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" text NOT NULL,
"description" text NOT NULL,
"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;
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;
6 changes: 0 additions & 6 deletions drizzle/0014_remarkable_synch.sql

This file was deleted.

158 changes: 151 additions & 7 deletions drizzle/meta/0013_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "7cbf375c-6bd0-4e9b-a290-40c41134d70d",
"id": "11d256f8-c5b6-4390-9cd6-c75f64c558d2",
"prevId": "ed5cf808-3f4a-45df-b384-69cac0367dc8",
"version": "7",
"dialect": "postgresql",
Expand Down Expand Up @@ -1144,8 +1144,14 @@
"cycle": false
}
},
"title": {
"name": "title",
"title_it": {
"name": "title_it",
"type": "text",
"primaryKey": false,
"notNull": true
},
"title_en": {
"name": "title_en",
"type": "text",
"primaryKey": false,
"notNull": true
Expand Down Expand Up @@ -1238,14 +1244,26 @@
"cycle": false
}
},
"title": {
"name": "title",
"title_it": {
"name": "title_it",
"type": "text",
"primaryKey": false,
"notNull": true
},
"title_en": {
"name": "title_en",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description_it": {
"name": "description_it",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"description_en": {
"name": "description_en",
"type": "text",
"primaryKey": false,
"notNull": true
Expand Down Expand Up @@ -1330,6 +1348,132 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.web_projects": {
"name": "web_projects",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"identity": {
"type": "always",
"name": "web_projects_id_seq",
"schema": "public",
"increment": "1",
"startWith": "1",
"minValue": "1",
"maxValue": "2147483647",
"cache": "1",
"cycle": false
}
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description_it": {
"name": "description_it",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description_en": {
"name": "description_en",
"type": "text",
"primaryKey": false,
"notNull": true
},
"logo": {
"name": "logo",
"type": "text",
"primaryKey": false,
"notNull": false
},
"link": {
"name": "link",
"type": "text",
"primaryKey": false,
"notNull": false
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'general'"
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_by_id": {
"name": "created_by_id",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"modified_by_id": {
"name": "modified_by_id",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"updated_at": {
"name": "updated_at",
"type": "timestamp (0) with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp (0) with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"web_projects_created_by_id_tg_permissions_user_id_fk": {
"name": "web_projects_created_by_id_tg_permissions_user_id_fk",
"tableFrom": "web_projects",
"tableTo": "tg_permissions",
"columnsFrom": [
"created_by_id"
],
"columnsTo": [
"user_id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"web_projects_modified_by_id_tg_permissions_user_id_fk": {
"name": "web_projects_modified_by_id_tg_permissions_user_id_fk",
"tableFrom": "web_projects",
"tableTo": "tg_permissions",
"columnsFrom": [
"modified_by_id"
],
"columnsTo": [
"user_id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.web_test": {
"name": "web_test",
"schema": "",
Expand Down
Loading