Below is the file 'init.sql' from this revision. You can also download the file.


CREATE TABLE gconf (
	version integer
);
INSERT INTO gconf (version) VALUES (1);

CREATE TABLE directories (
	id integer primary key,
	name text not null,
	parent_id integer not null,
	UNIQUE (name, parent_id)
);

CREATE TABLE keys (
	id integer primary key,
	name text,
	directory_id integer not null,
	mod_user text,
	mod_time text,
	value_type text,
	value,
	UNIQUE (name, directory_id)
);

CREATE TABLE keys_to_schema_name (
	key_id integer primary key,
	schema_name text
);

CREATE TABLE lists (
	key_id integer,
	list_idx integer,
	value,
	UNIQUE (key_id, list_idx)
);

CREATE TABLE pairs (
	key_id integer primary key,
	car_value_type text,
	car_value,
	cdr_value_type text,
	cdr_value
);

CREATE TABLE schemas (
	key_id integer primary key,
	schema_type text,
	scheam_list_type text,
	schema_car_type text,
	schema_cdr_type text,
	locale text,
	owner text,
	short_desc text,
	long_desc text,
	default_value_id integer
);

CREATE TABLE schemas_keys (
	id integer primary key,
	name text,
	directory_id integer not null,
	value_type text,
	value,
	UNIQUE (name, directory_id)
);

CREATE TABLE schemas_lists (
	key_id integer,
	list_idx integer,
	value_type text,
	value,
	UNIQUE (key_id, list_idx)
);

CREATE TABLE schemas_pairs (
	key_id integer primary key,
	car_value_type text,
	car_value,
	cdr_value_type text,
	cdr_value
);