Project

General

Profile

Download (894 Bytes) Statistics
| Branch: | Revision:

git_sitools_idoc / flarecast / database / HSQLDB / SITOOLS_CREATE_TABLES.sql @ master

1
CREATE TABLE "sitools"."USERS" (
2
  identifier varchar(64)  NOT NULL,
3
  firstname varchar(32)  DEFAULT NULL,
4
  lastname varchar(32)  DEFAULT NULL,
5
  email varchar(128)  DEFAULT NULL,
6
  secret varchar(40)  DEFAULT NULL,
7
  PRIMARY KEY (identifier)
8
);
9

    
10
CREATE TABLE IF NOT EXISTS "sitools"."GROUPS" (
11
  name varchar(32) NOT NULL,
12
  description varchar(128)  DEFAULT NULL,
13
  PRIMARY KEY (name)
14
);
15

    
16
CREATE TABLE IF NOT EXISTS "sitools"."USER_GROUP" (
17
  identifier varchar(64)  NOT NULL,
18
  name varchar(32)  NOT NULL,
19
  PRIMARY KEY (identifier,name),
20
  FOREIGN KEY (name) REFERENCES "sitools"."GROUPS" (name),
21
  FOREIGN KEY (identifier) REFERENCES "sitools"."USERS" (identifier)
22
);
23

    
24
CREATE TABLE IF NOT EXISTS "sitools"."USER_PROPERTIES" (
25
  key varchar(64)  NOT NULL,
26
  value varchar(256)  DEFAULT NULL,
27
  identifier varchar(64)  DEFAULT NULL,
28
  scope varchar(8)  DEFAULT NULL,
29
  PRIMARY KEY (key)
30
);