setup email

This commit is contained in:
phaichayon
2026-07-06 23:07:55 +07:00
parent d93f25e1ce
commit 18cc9bbfd0
30 changed files with 8907 additions and 156 deletions

View File

@@ -0,0 +1,25 @@
CREATE TABLE "email_configurations" (
"id" text PRIMARY KEY NOT NULL,
"organization_id" text NOT NULL,
"provider_type" text DEFAULT 'smtp' NOT NULL,
"name" text NOT NULL,
"host" text NOT NULL,
"port" integer DEFAULT 587 NOT NULL,
"secure" boolean DEFAULT false NOT NULL,
"username" text,
"password_encrypted" text,
"from_email" text NOT NULL,
"from_name" text,
"reply_to_email" text,
"is_default" boolean DEFAULT false NOT NULL,
"is_active" boolean DEFAULT true NOT NULL,
"last_test_status" text DEFAULT 'not_tested' NOT NULL,
"last_tested_at" timestamp with time zone,
"last_test_error" text,
"created_by" text NOT NULL,
"updated_by" text NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX "email_configurations_org_name_idx" ON "email_configurations" USING btree ("organization_id","name");

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,13 @@
"when": 1783326039269,
"tag": "0000_classy_unicorn",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1783350585715,
"tag": "0001_yellow_wasp",
"breakpoints": true
}
]
}