From 7a39a8474c02e1dc5c3e8a81d73e22a5afcb88f1 Mon Sep 17 00:00:00 2001 From: Markus Brueckner Date: Tue, 17 Dec 2024 10:53:59 +0100 Subject: [PATCH] - change email to varchar instead of text --- drizzle/0000_harsh_warlock.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drizzle/0000_harsh_warlock.sql b/drizzle/0000_harsh_warlock.sql index 938635e..6098226 100644 --- a/drizzle/0000_harsh_warlock.sql +++ b/drizzle/0000_harsh_warlock.sql @@ -38,7 +38,7 @@ CREATE TABLE `surveys_table` ( --> statement-breakpoint CREATE TABLE `users_table` ( `id` int AUTO_INCREMENT NOT NULL, - `email` text NOT NULL, + `email` varchar(255) NOT NULL, `password_hash` text NOT NULL, CONSTRAINT `users_table_id` PRIMARY KEY(`id`), CONSTRAINT `users_table_email_unique` UNIQUE(`email`) @@ -50,4 +50,4 @@ ALTER TABLE `survey_answers_table` ADD CONSTRAINT `survey_answers_table_particip ALTER TABLE `survey_answers_table` ADD CONSTRAINT `survey_answers_table_skillId_survey_skills_table_id_fk` FOREIGN KEY (`skillId`) REFERENCES `survey_skills_table`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint ALTER TABLE `survey_skills_table` ADD CONSTRAINT `survey_skills_table_surveyId_surveys_table_id_fk` FOREIGN KEY (`surveyId`) REFERENCES `surveys_table`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint ALTER TABLE `surveys_table` ADD CONSTRAINT `surveys_table_owner_users_table_id_fk` FOREIGN KEY (`owner`) REFERENCES `users_table`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -CREATE INDEX `token_index` ON `survey_access_table` (`accessToken`); \ No newline at end of file +CREATE INDEX `token_index` ON `survey_access_table` (`accessToken`);