CREATE SEQUENCE "file_id_seq";
CREATE SEQUENCE "log_id_seq";
CREATE TABLE "files" (
	"file_id" int4 DEFAULT nextval ( 'file_id_seq' ) NOT NULL PRIMARY KEY,
	"file_name" text NOT NULL,
	"cdate" timestamp,
	"mime" text,
	"size" int4,
	"file" oid NOT NULL,
	"description" text,
	"vfs_user" text NOT NULL);
CREATE TABLE "vfs_users" (
	"vfs_user" text NOT NULL PRIMARY KEY,
	"password" text NOT NULL,
	"administrator" bool);
CREATE TABLE "user_files" (
	"vfs_user" text,
	"file_id" int4);
CREATE TABLE "access_log" (
	"log_id" int4 DEFAULT nextval ( 'log_id_seq' ) NOT NULL PRIMARY KEY,
	"file_id" int4 NOT NULL,
	"down_start" timestamp,
	"down_finish" timestamp,
	"down_user" text,
	"remote_host" text);
