-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
51 lines (44 loc) · 1001 Bytes
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
drop table if exists Application;
drop table if exists Ticket;
drop table if exists User;
drop table if exists Software;
drop table if exists Host;
drop table if exists Datacenter;
create table Datacenter (
id text primary key not null,
address text
);
create table Host (
id text primary key not null,
os text,
cpus int,
ramGB int,
diskGB int,
vmHost text references Host(id),
datacenter text references Datacenter(id)
);
create table Software (
id text primary key not null,
vendor text,
name text,
version text,
description text
);
create table Application (
id text primary key not null,
software text references Software(id),
runsOn text references Host(id),
description text
);
create table User (
id text primary key not null,
name text
);
create table Ticket (
id integer primary key AUTOINCREMENT,
description text not null,
created date,
user text references User(id),
severity text,
application text references Application(id)
);