rename tables
This commit is contained in:
1 parent
188a26e77d
commit
a642a8fda4
11 files changed
+158
-56
No files matched your search
@@ -1,4 +1,4 @@
|
||||
create table card_set
|
||||
create table decks
|
||||
(
|
||||
id INTEGER
|
||||
primary key autoincrement,
|
||||
+4
-3
@@ -2,10 +2,11 @@ create table history
|
||||
(
|
||||
id INTEGER
|
||||
primary key autoincrement,
|
||||
set_id INTEGER not null references card_set on delete cascade,
|
||||
stat_id INTEGER not null references card_stats on delete cascade,
|
||||
set_id INTEGER not null references decks on delete cascade,
|
||||
stat_id INTEGER not null references states on delete cascade,
|
||||
timestamp INTEGER not null,
|
||||
answer INTEGER not null,
|
||||
before INTEGER not null,
|
||||
after INTEGER not null
|
||||
after INTEGER not null,
|
||||
fsrs INTEGER not null
|
||||
);
|
||||
@@ -1,4 +1,4 @@
|
||||
create table card_stats
|
||||
create table states
|
||||
(
|
||||
id INTEGER
|
||||
primary key autoincrement,
|
||||
@@ -6,7 +6,7 @@ create table card_stats
|
||||
references words
|
||||
on delete cascade,
|
||||
set_id INTEGER not null
|
||||
references card_set
|
||||
references decks
|
||||
on delete cascade,
|
||||
score INTEGER default 1 not null,
|
||||
last_opened INTEGER not null,
|
||||
@@ -1,4 +1,4 @@
|
||||
create table word_group
|
||||
create table word_groups
|
||||
(
|
||||
id INTEGER
|
||||
primary key autoincrement,
|
||||
+2
-2
@@ -7,7 +7,7 @@ create table words
|
||||
tags TEXT not null,
|
||||
more TEXT,
|
||||
group_id integer default 1 not null
|
||||
constraint words_word_group_id_fk
|
||||
references word_group
|
||||
constraint words_word_groups_id_fk
|
||||
references word_groups
|
||||
on update cascade on delete cascade
|
||||
);
|
||||
Reference in new issue
Block a user