summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-14 21:34:24 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-14 21:34:24 +0200
commit1b6f8ac3bf04b5986c4bfd60a43ac4607e375ad8 (patch)
tree187ad934ad43bd6a8984b7715e5be6649e3af879 /schema.sql
parent3c3a241c374e42206ad0b9f67f66e6b80ff73d1b (diff)
downloadpgfuse-1b6f8ac3bf04b5986c4bfd60a43ac4607e375ad8.tar.gz
pgfuse-1b6f8ac3bf04b5986c4bfd60a43ac4607e375ad8.tar.bz2
-
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql8
1 files changed, 5 insertions, 3 deletions
diff --git a/schema.sql b/schema.sql
index 9affe44..fb622ba 100644
--- a/schema.sql
+++ b/schema.sql
@@ -5,13 +5,14 @@ CREATE TABLE dir (
path TEXT,
UNIQUE( name, parent_id ),
UNIQUE( path ),
+ size INTEGER DEFAULT 0,
mode INTEGER NOT NULL DEFAULT 0,
uid INTEGER NOT NULL DEFAULT 0,
gid INTEGER NOT NULL DEFAULT 0,
+ inuse BOOL DEFAULT false,
ctime TIMESTAMP WITH TIME ZONE,
mtime TIMESTAMP WITH TIME ZONE,
- atime TIMESTAMP WITH TIME ZONE,
- size INTEGER DEFAULT 0
+ atime TIMESTAMP WITH TIME ZONE
);
CREATE TABLE data (
@@ -46,4 +47,5 @@ CREATE OR REPLACE RULE "dir_remove" AS ON
-- self-referencing anchor for root directory
-- 16895 = S_IFDIR and 0777 permissions
-- TODO: should be done from outside, see note above
-INSERT INTO dir values( 0, 0, '/', '/', 16895 );
+INSERT INTO dir( id, parent_id, name, path, size, mode, uid, gid )
+ VALUES( 0, 0, '/', '/', 0, 16895, 0, 0 );