Files
photoview/api/database/migrations/004_shares.up.sql
viktorstrate 687b4f4f7f Work on shares
2020-02-11 14:32:35 +01:00

13 lines
313 B
SQL

CREATE TABLE IF NOT EXISTS share_token (
token_id int AUTO_INCREMENT,
value char(24) NOT NULL UNIQUE,
owner_id int NOT NULL,
expire timestamp NULL DEFAULT NULL,
password varchar(256),
album_id int,
photo_id int,
PRIMARY KEY (token_id)
-- CHECK (album_id IS NOT NULL OR photo_id IS NOT NULL)
);