mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Fix database Fix bug #77 HELL YEAH !
This commit is contained in:
parent
f377bd1356
commit
56581a998a
2 changed files with 52 additions and 47 deletions
39
schema.sql
39
schema.sql
|
@ -1,28 +1,31 @@
|
|||
-- This is the database schema for PostgreSQL.
|
||||
-- This is the database schema for PostgreSQL and MySQL and SQLite.
|
||||
|
||||
create table collection (
|
||||
path varchar primary key not null,
|
||||
parent_path varchar references collection (path));
|
||||
path varchar(200) not null,
|
||||
parent_path varchar(200) references collection (path),
|
||||
primary key (path));
|
||||
|
||||
create table item (
|
||||
name varchar primary key not null,
|
||||
tag varchar not null,
|
||||
collection_path varchar references collection (path) not null);
|
||||
name varchar(200) not null,
|
||||
tag text not null,
|
||||
collection_path varchar(200) references collection (path),
|
||||
primary key (name));
|
||||
|
||||
create table header (
|
||||
key varchar not null,
|
||||
value varchar not null,
|
||||
collection_path varchar references collection (path) not null,
|
||||
primary key (key, collection_path));
|
||||
name varchar(200) not null,
|
||||
value text not null,
|
||||
collection_path varchar(200) references collection (path),
|
||||
primary key (name, collection_path));
|
||||
|
||||
create table line (
|
||||
key varchar not null,
|
||||
value varchar not null,
|
||||
item_name varchar references item (name) not null,
|
||||
timestamp timestamp not null);
|
||||
name text not null,
|
||||
value text not null,
|
||||
item_name varchar(200) references item (name),
|
||||
timestamp bigint not null,
|
||||
primary key (timestamp));
|
||||
|
||||
create table property (
|
||||
key varchar not null,
|
||||
value varchar not null,
|
||||
collection_path varchar references collection (path) not null,
|
||||
primary key (key, collection_path));
|
||||
name varchar(200) not null,
|
||||
value text not null,
|
||||
collection_path varchar(200) references collection (path),
|
||||
primary key (name, collection_path));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue