datatrash/init-db.sql

15 lines
532 B
MySQL
Raw Normal View History

2020-07-09 20:01:25 +00:00
CREATE TABLE IF NOT EXISTS files (
id serial,
2020-07-24 17:56:17 +00:00
file_id varchar(255) not null unique,
2020-07-09 20:01:25 +00:00
file_name varchar(255) not null,
valid_till timestamp not null,
kind varchar(255) not null,
primary key (id)
);
ALTER TABLE files ADD COLUMN IF NOT EXISTS delete_on_download boolean;
2021-09-24 20:51:13 +00:00
ALTER TABLE files ALTER COLUMN delete_on_download set not null;
2022-02-27 00:50:29 +00:00
ALTER TABLE files ALTER COLUMN valid_till TYPE timestamptz;
ALTER TABLE files DROP COLUMN IF EXISTS kind;
ALTER TABLE files ADD COLUMN IF NOT EXISTS content_type varchar(255);