21 lines
499 B
MySQL
21 lines
499 B
MySQL
|
-- Deploy camper:media_content to pg
|
||
|
-- requires: roles
|
||
|
-- requires: schema_camper
|
||
|
-- requires: media_type
|
||
|
|
||
|
begin;
|
||
|
|
||
|
set search_path to camper, public;
|
||
|
|
||
|
create table media_content (
|
||
|
content_hash bytea not null generated always as (sha256(bytes)) stored primary key,
|
||
|
media_type media_type not null,
|
||
|
bytes bytea not null
|
||
|
);
|
||
|
|
||
|
grant select on table media_content to guest;
|
||
|
grant select on table media_content to employee;
|
||
|
grant select, insert, delete, update on table media_content to admin;
|
||
|
|
||
|
commit;
|