Skip to content

Commit

Permalink
feat: add user file schema
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Mar 20, 2024
1 parent fcce43d commit 31d00d8
Show file tree
Hide file tree
Showing 6 changed files with 930 additions and 163 deletions.
12 changes: 12 additions & 0 deletions drizzle/0005_fine_turbo.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE TABLE `user_file` (
`id` text PRIMARY KEY NOT NULL,
`user_id` text,
`hashed` text,
`path` text,
`filename` text,
`size_in_byte` integer,
`created_at` integer
);
--> statement-breakpoint
ALTER TABLE user ADD `storage_usage` integer DEFAULT 0;--> statement-breakpoint
CREATE INDEX `user_file_index` ON `user_file` (`user_id`,`created_at`);
Loading

0 comments on commit 31d00d8

Please sign in to comment.