chir.rs/chir-rs-db/migrations/20241123151924_add-file-table.sql

10 lines
293 B
MySQL
Raw Normal View History

2024-11-26 07:41:01 +00:00
-- Add migration script here
2024-11-28 07:45:41 +00:00
create table file_map (
id bigint generated always as identity,
2024-11-26 07:41:01 +00:00
file_path text not null,
mime text not null,
2024-11-28 07:45:41 +00:00
b3hash bytea not null
2024-11-26 07:41:01 +00:00
);
2024-11-28 07:45:41 +00:00
create unique index file_path_mime on file_map (file_path, mime);
create index file_path on file_map (file_path);