Commits

hani  committed 1c60109

Initial import from SourceForge

  • Participants
  • Parent commits 0e58c7b

Comments (0)

Files changed (1)

File src/etc/deployment/jdbc/postgres.sql

+create table OS_PROPERTYENTRY
+(
+	GLOBAL_KEY varchar(255),
+	ITEM_KEY varchar(255),
+	ITEM_TYPE smallint,
+	STRING_VALUE varchar(255),
+	DATE_VALUE timestamp,
+	DATA_VALUE oid,
+	FLOAT_VALUE float8,
+	NUMBER_VALUE numeric,
+	primary key (GLOBAL_KEY, ITEM_KEY)
+);
+
+create table OS_USER
+(
+    USERNAME varchar(20),
+    PASSWORDHASH varchar(2024),
+    primary key (USERNAME)
+);
+
+create table OS_GROUP
+(
+    GROUPNAME varchar(20),
+    primary key (GROUPNAME)
+);
+
+create table OS_MEMBERSHIP
+(
+    USERNAME varchar(20),
+    GROUPNAME varchar(20),
+    primary key (USERNAME, GROUPNAME),
+    foreign key (USERNAME) references OS_USER(USERNAME),
+    foreign key (GROUPNAME) references OS_GROUP(GROUPNAME)
+);
+
+create table OS_WFENTRY
+(
+    ID bigint,
+    NAME varchar(20),
+    INITIALIZED smallint,
+    primary key (ID)
+);
+
+create table OS_CURRENTSTEP
+(
+    ID bigint,
+    ENTRY_ID bigint,
+    STEP_ID smallint,
+    ACTION_ID smallint,
+    OWNER varchar(20),
+    START_DATE timestamp,
+    FINISH_DATE timestamp,
+    DUE_DATE timestamp,
+    STATUS varchar(20),
+    CALLER varchar(20),
+    primary key (ID),
+    foreign key (ENTRY_ID) references OS_WFENTRY(ID),
+    foreign key (OWNER) references OS_USER(USERNAME),
+    foreign key (CALLER) references OS_USER(USERNAME)
+);
+
+create table OS_HISTORYSTEP
+(
+    ID bigint,
+    ENTRY_ID bigint,
+    STEP_ID smallint,
+    ACTION_ID smallint,
+    OWNER varchar(20),
+    START_DATE timestamp,
+    FINISH_DATE timestamp,
+    DUE_DATE timestamp,
+    STATUS varchar(20),
+    CALLER varchar(20),
+    primary key (ID),
+    foreign key (ENTRY_ID) references OS_WFENTRY(ID),
+    foreign key (OWNER) references OS_USER(USERNAME),
+    foreign key (CALLER) references OS_USER(USERNAME)
+);
+
+create table OS_CURRENTSTEP_PREV
+(
+    ID bigint,
+    PREVIOUS_ID bigint,
+    primary key (ID, PREVIOUS_ID),
+    foreign key (ID) references OS_CURRENTSTEP(ID),
+    foreign key (PREVIOUS_ID) references OS_HISTORYSTEP(ID)
+);
+
+create table OS_HISTORYSTEP_PREV
+(
+    ID bigint,
+    PREVIOUS_ID bigint,
+    primary key (ID, PREVIOUS_ID),
+    foreign key (ID) references OS_HISTORYSTEP(ID),
+    foreign key (PREVIOUS_ID) references OS_HISTORYSTEP(ID)
+);
+
+create sequence seq_os_wfentry minvalue 10 increment 10;
+
+create sequence seq_os_currentsteps;