diff --git a/migrations/sqlite/0001_initial_state.sql b/migrations/sqlite/0001_initial_state.sql index 9b3734a..e213ffe 100644 --- a/migrations/sqlite/0001_initial_state.sql +++ b/migrations/sqlite/0001_initial_state.sql @@ -28,6 +28,9 @@ create table system_config ( ); -- SQL-based Bible parsing. +insert into system_config values ('bible.sql.enable', 'false', true); +-- Enable SQL configuration override. Requires setting the connection DSN via an +-- environment variable (DBCONN). insert into system_config values ('config.sql.enable', 'false', true); insert into system_config (config, value) values ('service.method', 'webhook'); insert into system_config (config, value) values ('service.webhook.uri', 'https://example.com/bot'); @@ -39,9 +42,13 @@ insert into system_config (config, value) values ('translations.active', 'bsb'); create table users ( id integer primary key, - username text not null + username text not null, + firstname text not null, + lastname text default '' not null ); -insert into users values (1, 'system'); +create unique index users_username_idx on users(username); +create index users_firstname_idx on users(firstname); +insert into users (id, username, firstname) values (1, 'system', 'system'); -- Bible metadata. create table translations (