Remove duplicate verses and fix other tables.

This commit is contained in:
Benjamin A. Shelton 2026-10-08 17:05:22 -06:00
commit 52e5206988
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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)
);