Subversion Repositories computer_asset_manager_v2

Rev

Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 22
Line 11... Line 11...
11
create table _system (
11
create table _system (
12
  _system_id      int unsigned not null auto_increment,
12
  _system_id      int unsigned not null auto_increment,
13
  group_name      varchar(64) NOT NULL COMMENT 'used to group keys together',
13
  group_name      varchar(64) NOT NULL COMMENT 'used to group keys together',
14
  key_name        varchar(64) NOT NULL COMMENT 'key into this value',
14
  key_name        varchar(64) NOT NULL COMMENT 'key into this value',
15
  theValue        text null COMMENT 'the actual value of this entry',
15
  theValue        text null COMMENT 'the actual value of this entry',
16
  PRIMARY KEY     (_system_id )
16
  primary key     (_system_id )
17
)  COMMENT='Basically a configuration file equivilent to a windows INI ';
17
)  COMMENT='Basically a configuration file equivilent to a windows INI ';
18
 
18
 
19
/* used by the auth class */
19
/* used by the auth class */
20
drop table if exists _user;
20
drop table if exists _user;
21
create table _user (
21
create table _user (
Line 51... Line 51...
51
drop table if exists client;
51
drop table if exists client;
52
create table client (
52
create table client (
53
   client_id   int unsigned not null auto_increment,
53
   client_id   int unsigned not null auto_increment,
54
   name        varchar(64) comment 'Name of the client',
54
   name        varchar(64) comment 'Name of the client',
55
   notes       text comment 'Any notes you want to enter',
55
   notes       text comment 'Any notes you want to enter',
-
 
56
   internal_notes text comment 'private notes accessible only to technicians',
56
   added_date  date not null comment 'Date record added to database',
57
   added_date  date not null comment 'Date record added to database',
57
   removed_date date default null comment 'Date record marked as removed',
58
   removed_date date default null comment 'Date record marked as removed',
58
   primary key (client_id)
59
   primary key (client_id)
59
) comment 'Stores information about a particlar client/owner';
60
) comment 'Stores information about a particlar client/owner';
60
 
61
 
Line 93... Line 94...
93
   By using a child table, we can track movement across this relationship
94
   By using a child table, we can track movement across this relationship
94
*/
95
*/
95
drop table if exists device_device;
96
drop table if exists device_device;
96
create table device_device (
97
create table device_device (
97
   device_device_id int unsigned not null auto_increment,
98
   device_device_id int unsigned not null auto_increment,
98
   source       int unsigned not null references device( device_id ),
99
   device_id    int unsigned not null references device( device_id ),
99
   target       int unsigned not null references device( device_id ),
100
   parent_id    int unsigned not null references device( device_id ),
100
   added_date  date not null comment 'Date record added to database',
101
   added_date  date not null comment 'Date record added to database',
101
   removed_date date default null comment 'Date record marked as removed',
102
   removed_date date default null comment 'Date record marked as removed',
102
   primary key (device_device_id)
103
   primary key (device_device_id)
103
) comment 'joins device to another device';
104
) comment 'joins device to another device';
104
 
105
 
Line 194... Line 195...
194
insert into _menu values ( null, null, 'Log Out', 'logout.html' );
195
insert into _menu values ( null, null, 'Log Out', 'logout.html' );
195
 
196
 
196
/* one user, admin, with no password for initial access */
197
/* one user, admin, with no password for initial access */
197
insert into _user( username,added_date) values ( 'admin', now() );
198
insert into _user( username,added_date) values ( 'admin', now() );
198
 
199
 
199
insert into device_type (name,flags, added_date ) values ( 'Computer',1,now() );
200
/* insert into device_type (name,flags, added_date ) values ( 'Computer',1,now() ); */