From ebc41a5f8e439b472dc8ff37390963a0f723d7e3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Thu, 8 Oct 2026 17:20:41 -0600 Subject: [PATCH] Fixed errors. --- migrations/sqlite/0001_initial_state.sql | 31 ++++++++++-------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/migrations/sqlite/0001_initial_state.sql b/migrations/sqlite/0001_initial_state.sql index 56c0d48..9a6dfa4 100644 --- a/migrations/sqlite/0001_initial_state.sql +++ b/migrations/sqlite/0001_initial_state.sql @@ -24,20 +24,20 @@ create table system_config ( value text, primary key (config) ); -insert into system_config ('config.sql.enable', 'false'); -insert into system_config ('service.method', 'webhook'); -insert into system_config ('service.webhook.uri', 'https://example.com/bot'); -insert into system_config ('service.webhook.port', '2020'); -insert into system_config ('service.webhook.host', '::'); -insert into system_config ('system.timezone', 'America/Denver'); -insert into system_config ('translations.basedir', 'data/translations'); -insert into system_config ('translations.active', 'bsb'); +insert into system_config values ('config.sql.enable', 'false'); +insert into system_config values ('service.method', 'webhook'); +insert into system_config values ('service.webhook.uri', 'https://example.com/bot'); +insert into system_config values ('service.webhook.port', '2020'); +insert into system_config values ('service.webhook.host', '::'); +insert into system_config values ('system.timezone', 'America/Denver'); +insert into system_config values ('translations.basedir', 'data/translations'); +insert into system_config values ('translations.active', 'bsb'); create table users ( id integer primary key, username text not null ); -insert into users (1, 'system'); +insert into users values (1, 'system'); create table verses ( id integer primary key autoincrement, @@ -64,7 +64,7 @@ create table chat_verses ( chatid integer not null, verseid integer not null, - foreign key (chatid) referencees chats(id), + foreign key (chatid) references chats(id), foreign key (verseid) references verses(id), primary key (chatid, verseid) @@ -91,9 +91,8 @@ create table translations ( api_endpoint text default "" not null, title text not null - - primary key (id) ); + create unique index translations_code_idx on translations(code); create table books ( @@ -119,9 +118,7 @@ create table books ( -- 2 = alternate reading #2 (OT = LXX, NT = Western/Latin) variant integer default 0 not null, - foreign key (translationid) references translations(id), - - primary key (id) + foreign key (translationid) references translations(id) ); create unique index books_code_idx on books(code); @@ -134,8 +131,6 @@ create table chapters ( -- Mapping code is used to adjust the chapter count, such as for the Septuagint. Mapping codes currently only function for adjusting the chapter count to adjust for the Masoretic Text reading. mapping_code integer default 0 not null, - foreign key (bookid) references book(id), - - primary key (id) + foreign key (bookid) references book(id) ); create unique index chapters_id_num_idx on chapters(id, num);