mtfosbot_schema/20190522-1.sql
2019-05-22 22:25:56 +08:00

26 lines
627 B
SQL

create table instagram
(
id varchar(256) not null
constraint instagram_pk
primary key,
lastpost varchar(256) default '' not null,
ctime timestamp with time zone default current_timestamp not null,
mtime timestamp with time zone default current_timestamp not null
);
create table line_ig_rt
(
line varchar(100) not null
constraint line_ig_rt_line_group_id_fk
references line_group
on delete cascade,
ig varchar(256) not null
constraint line_ig_rt_instagram_id_fk
references instagram
on delete cascade,
tmpl varchar(512) default '' not null,
constraint line_ig_rt_pk
primary key (line, ig)
);