Subversion Repositories computer_asset_manager_v1

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
82 rodolico 1
/*
2
   To use this, copy the script and replace OLDSERVERID and NEWSERVERID with the
3
   device_ids of the old and new servers, respectively.
4
 
5
   Will set up new maintenance for a device based on the maintenance schedule
6
   for another one.
7
 
8
   NOTE: does not check to see if maintenance is already set up. That is your
9
   job.
10
 
11
*/
12
 
13
insert into maintenance_schedule
14
   select 
15
      null,
16
      NEWSERVERID,
17
      maintenance_task_id,
18
      schedule,
19
      login_id,
20
      now(),
21
      null 
22
   from
23
      maintenance_schedule 
24
   where 
25
      device_id=OLDSERVERID;
26
 
27
insert into maintenance_performed
28
   select 
29
      null,
30
      device_id,
31
      maintenance_task_id,
32
      now(),
33
      'Initial Setup',
34
      login_id 
35
   from 
36
      maintenance_schedule 
37
   where 
38
      device_id = NEWSERVERID;