2020-02-09 21:25:33 +01:00
|
|
|
CREATE TABLE IF NOT EXISTS share_token (
|
|
|
|
token_id int AUTO_INCREMENT,
|
|
|
|
value char(24) NOT NULL UNIQUE,
|
|
|
|
owner_id int NOT NULL,
|
2020-02-11 14:32:35 +01:00
|
|
|
expire timestamp NULL DEFAULT NULL,
|
|
|
|
password varchar(256),
|
2020-02-09 21:25:33 +01:00
|
|
|
album_id int,
|
|
|
|
photo_id int,
|
|
|
|
|
2020-02-11 14:32:35 +01:00
|
|
|
PRIMARY KEY (token_id)
|
|
|
|
-- CHECK (album_id IS NOT NULL OR photo_id IS NOT NULL)
|
2020-02-09 21:25:33 +01:00
|
|
|
);
|