server_schema.sql 855 Bytes
Newer Older
1
2
3
4
5
6
7
8
-- Deploy server:server_schema to pg

BEGIN;


-- Server table creation
CREATE TABLE Server (
  ServerId SERIAL PRIMARY KEY,
9
  ServerName VARCHAR(255) NOT NULL,
10
11
12
13
14
  ServerDescription VARCHAR(255) NOT NULL,
  ServerModelId INTEGER NOT NULL,
  ZoneId INTEGER,
  MachineId INTEGER,
  ServerConfiguration JSON,
Bruno Boiget's avatar
Bruno Boiget committed
15
  ServerConfigurationTD JSON,
16
17
18
19
  Automation VARCHAR(25),
  ServerEnvironment JSON,
  LastPeerConnection TIMESTAMP DEFAULT NULL
);
20
21
22
23
24
-- serverselection table creation
CREATE TABLE ServerSelection (
  ServerSelectionId SERIAL PRIMARY KEY,
  ServerSelectionName VARCHAR(255) NOT NULL,
  ServerSelectionDescription VARCHAR(255) NOT NULL,
Matthieu Lamalle's avatar
Acl    
Matthieu Lamalle committed
25
  ServerSelectionServersId INTEGER [] DEFAULT '{}',
26
27
28
29
30
31
32
  ServerSelectionUsers hstore,
  Dynamique BOOLEAN NOT NULL,
  Requete VARCHAR(255)
);
ALTER TABLE ServerSelection ALTER COLUMN Dynamique
SET DEFAULT FALSE;

33
34

COMMIT;