-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchef.sqlite.schema
More file actions
33 lines (28 loc) · 914 Bytes
/
chef.sqlite.schema
File metadata and controls
33 lines (28 loc) · 914 Bytes
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
create table `names` (
`id` integer primary key,
`name` text not null unique
) strict;
create table `combinations` (
`id` integer primary key,
`ip` integer not null,
`name` integer not null references `names`(`id`),
unique (`ip`, `name`)
) strict;
create index idx_comb_name on `combinations`(`name`);
create index idx_comb_ip on `combinations`(`ip`);
create table `servers` (
`id` integer primary key,
`ip` text not null,
`port` integer not null,
`description` text not null,
`mod` text,
`last_seen` integer not null default (strftime('%s', 'now')),
unique (`ip`, `port`)
) strict;
create index idx_srv_descr on `servers`(`description`);
create table `sightings` (
`combination` integer not null references `combinations`(`id`),
`server` integer not null references `servers`(`id`),
`timestamp` integer not null default (strftime('%s', 'now')),
unique (`combination`, `timestamp`)
) strict;