radicale/schema.sql

32 lines
989 B
MySQL
Raw Normal View History

2013-12-17 14:35:55 +01:00
-- This is the database schema for PostgreSQL and MySQL and SQLite.
2013-04-26 13:43:44 +02:00
create table collection (
2013-12-17 14:35:55 +01:00
path varchar(200) not null,
parent_path varchar(200) references collection (path),
primary key (path));
2013-04-26 13:43:44 +02:00
create table item (
2013-12-17 14:35:55 +01:00
name varchar(200) not null,
tag text not null,
collection_path varchar(200) references collection (path),
primary key (name));
2013-04-26 13:43:44 +02:00
create table header (
2013-12-17 14:35:55 +01:00
name varchar(200) not null,
value text not null,
collection_path varchar(200) references collection (path),
primary key (name, collection_path));
2013-04-26 13:43:44 +02:00
create table line (
2013-12-17 14:35:55 +01:00
name text not null,
value text not null,
item_name varchar(200) references item (name),
timestamp bigint not null,
primary key (timestamp));
2013-04-26 13:43:44 +02:00
create table property (
2013-12-17 14:35:55 +01:00
name varchar(200) not null,
value text not null,
collection_path varchar(200) references collection (path),
primary key (name, collection_path));