adds a multivals table

for columns that store multiple values (multi = true), we store a NULL
in the data_* table and put all the values in the multivals table. The
row column acts as a simple counter so values can be stored and
retrieved in the correct order.
This commit is contained in:
Andreas Gohr
2016-02-02 11:11:09 +01:00
parent 4e2abec04b
commit 706e7c4b4f
2 changed files with 12 additions and 1 deletions

View File

@ -1 +1 @@
2
3

11
db/update0003.sql Normal file
View File

@ -0,0 +1,11 @@
-- stores multi values for all tables, we might split this later into one multival
-- table per data table
CREATE TABLE multivals (
tbl NOT NULL,
colref INTEGER NOT NULL,
pid NOT NULL,
rev INTEGER NOT NULL,
row INTEGER NOT NULL,
value,
PRIMARY KEY(tbl, colref, pid, rev, row)
);