Subversion Repositories computer_asset_manager_v1

Rev

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

Rev 50 Rev 70
Line 12... Line 12...
12
   device_id         int unsigned not null references device (device_id),
12
   device_id         int unsigned not null references device (device_id),
13
   backups_server_id  int unsigned not null references backup_server (backups_server_id),
13
   backups_server_id  int unsigned not null references backup_server (backups_server_id),
14
   allocated_size    bigint default 1073741824 comment 'number of bytes client is paying for',
14
   allocated_size    bigint default 1073741824 comment 'number of bytes client is paying for',
15
   start_time        time comment 'default start time of backup',
15
   start_time        time comment 'default start time of backup',
16
   notes             text comment 'any notes we want to keep on this',
16
   notes             text comment 'any notes we want to keep on this',
-
 
17
   bandwidth_allocated int unsigned comment 'amount of bandwidth in megabits/s',
17
   responsible_party varchar(64) comment 'email address of who to notify for problems',
18
   responsible_party varchar(64) comment 'email address of who to notify for problems',
-
 
19
   added_date        date,
-
 
20
   removed_date      date default null,
18
   primary key       (backups_id)
21
   primary key       (backups_id)
19
) comment 'stores information on backup jobs allocated';
22
) comment 'stores information on backup jobs allocated';
20
 
23
 
-
 
24
 
-
 
25
 
21
DROP TABLE IF EXISTS backups_run;
26
DROP TABLE IF EXISTS backups_run;
22
CREATE TABLE backups_run (
27
CREATE TABLE backups_run (
23
  backups_run_id     int unsigned not null auto_increment,
28
  backups_run_id     int unsigned not null auto_increment,
24
  backups_id         int unsigned not null references backups( backups_id ),
29
  backups_id         int unsigned not null references backups( backups_id ),
25
  report_date        datetime not null comment 'Date on the actual log file as part of its filename',
30
  report_date        datetime not null comment 'Date on the actual log file as part of its filename',
Line 129... Line 134...
129
   backups.device_id = <device_id>
134
   backups.device_id = <device_id>
130
order by
135
order by
131
   backups_run.report_date desc
136
   backups_run.report_date desc
132
limit <count>','device_id++Device ID++++
137
limit <count>','device_id++Device ID++++
133
count++Number of Reports++++');
138
count++Number of Reports++++');
-
 
139
 
-
 
140
/* This has a menu entry, so add it */
-
 
141
/* first, make sure we don't have any danglies */
-
 
142
/* create three menu options. First one is the main menu option (ie, no parent_id) */
-
 
143
insert into menu( url, caption, parent_id) values ('/modules/backup/', 'Backups', null);