Remove duplicate verses and fix other tables.
This commit is contained in:
parent
b628f8bf38
commit
52e5206988
1 changed files with 7 additions and 9 deletions
|
|
@ -61,7 +61,13 @@ create table verse_rotation (
|
|||
);
|
||||
|
||||
create table chat_verses (
|
||||
chatid integer not null,
|
||||
verseid integer not null,
|
||||
|
||||
foreign key (chatid) referencees chats(id),
|
||||
foreign key (verseid) references verses(id),
|
||||
|
||||
primary key (chatid, verseid)
|
||||
);
|
||||
|
||||
-- Enable with PRAGMA foreign_keys = ON;
|
||||
|
|
@ -82,7 +88,7 @@ create table translations (
|
|||
code text not null,
|
||||
|
||||
-- Helloao endpoint for this translation.
|
||||
api_endpoint text not null,
|
||||
api_endpoint text default "" not null,
|
||||
|
||||
title text not null
|
||||
|
||||
|
|
@ -133,11 +139,3 @@ create table chapters (
|
|||
primary key (id)
|
||||
);
|
||||
create unique index chapters_id_num_idx on chapters(id, num);
|
||||
|
||||
create table verses (
|
||||
id integer primary key autoincrement,
|
||||
chapterid integer not null,
|
||||
num integer default 0 not null,
|
||||
foreign key (chapterid) references chapters(id),
|
||||
primary key (id)
|
||||
);
|
||||
Loading…
Reference in a new issue