Added (experimental) schema for PostgreSQL.
This commit is contained in:
parent
2bc2878dd3
commit
1f6f4c2949
|
@ -0,0 +1,49 @@
|
|||
create table sessions (
|
||||
id serial primary key,
|
||||
start_date int,
|
||||
end_date int,
|
||||
prefix varchar
|
||||
);
|
||||
|
||||
create table filesets (
|
||||
id serial primary key,
|
||||
host varchar,
|
||||
dir varchar,
|
||||
options varchar
|
||||
);
|
||||
|
||||
create table files (
|
||||
id serial primary key,
|
||||
path varchar,
|
||||
fileset int references filesets(id)
|
||||
);
|
||||
|
||||
create table versions2 (
|
||||
id serial primary key,
|
||||
file_type char(1),
|
||||
file_size int8,
|
||||
file_mtime int,
|
||||
file_owner varchar,
|
||||
file_group varchar,
|
||||
file_acl varchar,
|
||||
file_unix_bits bit(3),
|
||||
file_rdev int,
|
||||
checksum varchar,
|
||||
file_linktarget varchar
|
||||
);
|
||||
create index versions2_file_mtime_idx on versions2(file_mtime);
|
||||
create index versions2_checksum_idx on versions2(checksum);
|
||||
|
||||
create table instances (
|
||||
id serial primary key,
|
||||
file int references files(id),
|
||||
file_id varchar,
|
||||
date int,
|
||||
online boolean,
|
||||
session int references sessions(id),
|
||||
version int references versions2(id)
|
||||
);
|
||||
create index instances_file_idx on instances(file);
|
||||
create index instances_session_idx on instances(session);
|
||||
create index instances_version_idx on instances(version);
|
||||
|
Loading…
Reference in New Issue