refactor: demo.db migration structure
Some checks failed
/ integration-test--firefox (push) Failing after 3m7s
Some checks failed
/ integration-test--firefox (push) Failing after 3m7s
This commit is contained in:
parent
1f05189ec6
commit
cd4096b2ff
9 changed files with 26 additions and 46 deletions
|
|
@ -1,12 +0,0 @@
|
|||
create table if not exists contacts (
|
||||
id integer primary key autoincrement,
|
||||
birthday text,
|
||||
manually_freshened_at date -- text, iso8601 date
|
||||
);
|
||||
|
||||
create table if not exists names (
|
||||
id integer primary key,
|
||||
contact_id integer not null references contacts(id) on delete cascade,
|
||||
sort integer not null,
|
||||
name text not null
|
||||
);
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
create table if not exists journal_entries (
|
||||
id integer primary key autoincrement,
|
||||
value text not null,
|
||||
date text not null
|
||||
);
|
||||
|
||||
create table if not exists contact_mentions (
|
||||
entry_id integer not null references journal_entries(id) on delete cascade,
|
||||
contact_id integer not null references contacts(id) on delete cascade,
|
||||
input_text text not null,
|
||||
byte_range_start integer not null,
|
||||
byte_range_end integer not null
|
||||
);
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
create table if not exists settings (
|
||||
id integer primary key,
|
||||
ics_path text
|
||||
);
|
||||
|
||||
insert into settings (id) values (1) on conflict (id) do nothing;
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
create table if not exists addresses (
|
||||
id integer primary key,
|
||||
contact_id integer not null references contacts(id) on delete cascade,
|
||||
label text,
|
||||
value text not null
|
||||
);
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
alter table contacts
|
||||
add column
|
||||
text_body text;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
create table if not exists groups (
|
||||
contact_id number not null references contacts(id),
|
||||
contact_id integer not null references contacts(id) on delete cascade,
|
||||
name text not null
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue