mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
* refactor: unify backend and frontend servers * refactor: correct paths for openapi & drizzle * refactor: move api-client to client * fix: drizzle paths * chore: fix linting issues * fix: form reset issue
17 lines
655 B
SQL
17 lines
655 B
SQL
CREATE TABLE `sessions_table` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`user_id` integer NOT NULL,
|
|
`expires_at` integer NOT NULL,
|
|
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
FOREIGN KEY (`user_id`) REFERENCES `users_table`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `users_table` (
|
|
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
`username` text NOT NULL,
|
|
`password_hash` text NOT NULL,
|
|
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
`updated_at` integer DEFAULT (unixepoch()) NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE UNIQUE INDEX `users_table_username_unique` ON `users_table` (`username`); |