gadl/migrations/1_platforms_and_books.sql
2023-12-24 22:10:01 +09:00

19 lines
448 B
SQL

-- migrate:up
create table platforms (
id integer primary key autoincrement,
name text unique not null,
secrets json not null default 'null'
);
create table books (
id integer primary key autoincrement,
reader_url text unique not null,
platform_id integer not null,
foreign key (platform_id) references platforms(id)
);
insert into platforms(name) values
('dmm-books'),
('google-play-books');
-- migrate:down