Subversion Repositories computer_asset_manager_v1

Rev

Rev 49 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49 Rev 99
Line 16... Line 16...
16
  added_date      datetime not null COMMENT 'date record was added',
16
  added_date      datetime not null COMMENT 'date record was added',
17
  removed_date    datetime default NULL COMMENT 'date record was closed',
17
  removed_date    datetime default NULL COMMENT 'date record was closed',
18
  PRIMARY KEY     (_system_id )
18
  PRIMARY KEY     (_system_id )
19
)  COMMENT='Basically a configuration file equivilent to a windows INI ';
19
)  COMMENT='Basically a configuration file equivilent to a windows INI ';
20
 
20
 
21
DROP TABLE IF EXISTS attrib;
-
 
22
CREATE TABLE attrib (
-
 
23
  attrib_id       int(10) unsigned NOT NULL auto_increment,
-
 
24
  name            varchar(64) not null unique COMMENT 'the visible displayed name',
-
 
25
  added_date      datetime not null COMMENT 'date record was added',
-
 
26
  removed_date    datetime default NULL COMMENT 'date record was deleted/supserceded',
-
 
27
  PRIMARY KEY     (attrib_id)
-
 
28
)   COMMENT='These are attributes that can be applied to a device';
-
 
29
 
-
 
30
 
-
 
31
DROP TABLE IF EXISTS client;
21
DROP TABLE IF EXISTS client;
32
CREATE TABLE client (
22
CREATE TABLE client (
33
  client_id       int(10) unsigned NOT NULL auto_increment,
23
  client_id       int(10) unsigned NOT NULL auto_increment,
34
  name            varchar(64) not null COMMENT 'the visible displayed name',
24
  name            varchar(64) not null COMMENT 'the visible displayed name',
35
  notes           text COMMENT 'world visible notes on the client',
25
  notes           text COMMENT 'world visible notes on the client',
Line 61... Line 51...
61
  added_date      datetime not null COMMENT 'date record was added',
51
  added_date      datetime not null COMMENT 'date record was added',
62
  removed_date    datetime default NULL COMMENT 'date record was deleted/supserceded',
52
  removed_date    datetime default NULL COMMENT 'date record was deleted/supserceded',
63
  PRIMARY KEY     (device_id)
53
  PRIMARY KEY     (device_id)
64
)   COMMENT='information on an individual device computer router print';
54
)   COMMENT='information on an individual device computer router print';
65
 
55
 
66
DROP TABLE IF EXISTS device_attrib;
-
 
67
CREATE TABLE device_attrib (
-
 
68
  device_attrib_id int unsigned not null auto_increment,
-
 
69
  device_id       int(10) unsigned NOT NULL REFERENCES device(device_id),
-
 
70
  attrib_id       int(10) unsigned NOT NULL REFERENCES attrib(attrib_id),
-
 
71
  value           text COMMENT 'The actual value of this attribute.',
-
 
72
  added_date      datetime NOT NULL COMMENT 'date record was added',
-
 
73
  removed_date    datetime default NULL,
-
 
74
  PRIMARY KEY     (device_attrib_id)
-
 
75
)  COMMENT='links devices and their attributes together';
-
 
76
 
-
 
77
 
-
 
78
DROP TABLE IF EXISTS device_type;
56
DROP TABLE IF EXISTS device_type;
79
CREATE TABLE device_type (
57
CREATE TABLE device_type (
80
  device_type_id  int(10) unsigned NOT NULL auto_increment,
58
  device_type_id  int(10) unsigned NOT NULL auto_increment,
81
  name            varchar(64) not null COMMENT 'the visible displayed name',
59
  name            varchar(64) not null COMMENT 'the visible displayed name',
82
  show_as_system  char(1) default 'Y',
60
  show_as_system  char(1) default 'Y',