summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2024-03-03 15:59:50 +0000
committerIan C <ianc@noddybox.co.uk>2024-03-03 15:59:50 +0000
commit06600b2d434490a0eca709ce2f38b34ce64794e8 (patch)
tree7d4288b68732d240b86776521e5f5ad843f037bf
parent980cd05307434da6aa5ac94ec930953f078cf5a0 (diff)
Added file_name to file_object and made everything not null
-rw-r--r--schema.sql15
1 files changed, 8 insertions, 7 deletions
diff --git a/schema.sql b/schema.sql
index 7839bf2..84a9008 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,14 +1,15 @@
create table if not exists file_object
(
- key varchar(32) not null primary key,
- mime_type varchar(64),
- data bytea
+ key varchar(64) not null primary key,
+ mime_type varchar(64) not null,
+ file_name varchar(64) not null,
+ data bytea not null
);
create table if not exists download
(
- key varchar(32) not null references file_object(key),
- ip_address varchar(32),
- user_agent varchar(128),
- time timestamp
+ key varchar(64) not null references file_object(key),
+ ip_address varchar(32) not null,
+ user_agent varchar(128) not null,
+ time timestamp not null
);