just a template from sv with drizzle + lucia demos
This commit is contained in:
commit
53728f4903
33 changed files with 1628 additions and 0 deletions
15
drizzle/0000_hard_thaddeus_ross.sql
Normal file
15
drizzle/0000_hard_thaddeus_ross.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
CREATE TABLE `session` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`user_id` text NOT NULL,
|
||||
`expires_at` integer NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `user` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`age` integer,
|
||||
`username` text NOT NULL,
|
||||
`password_hash` text NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_username_unique` ON `user` (`username`);
|
||||
Loading…
Add table
Add a link
Reference in a new issue