Files
moemail/drizzle/0006_thick_lester.sql

10 lines
364 B
SQL

CREATE TABLE `credential` (
`id` text PRIMARY KEY NOT NULL,
`userId` text NOT NULL,
`username` text NOT NULL,
`password` text NOT NULL,
`created_at` integer NOT NULL,
FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `credential_username_unique` ON `credential` (`username`);