Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
Remove everything with
|
2 |
Remove everything with
|
3 |
drop table if exists _config;
|
- |
|
4 |
drop table if exists _menu;
|
3 |
drop table if exists _menu;
|
5 |
drop table if exists _permissions;
|
- |
|
6 |
drop table if exists _permissions_categories;
|
- |
|
7 |
drop table if exists _system;
|
4 |
drop table if exists _system;
|
8 |
drop table if exists _users_permissions;
|
- |
|
9 |
drop view if exists _view_users_permissions;
|
- |
|
10 |
drop table if exists client;
|
- |
|
11 |
drop table if exists client_device;
|
- |
|
12 |
drop table if exists client_site;
|
- |
|
13 |
drop table if exists device;
|
5 |
drop table if exists device;
|
14 |
drop table if exists device_device;
|
6 |
drop table if exists device_device;
|
15 |
drop table if exists device_device_type;
|
7 |
drop table if exists device_device_type;
|
16 |
drop table if exists device_type;
|
8 |
drop table if exists device_type;
|
17 |
drop table if exists site;
|
9 |
drop table if exists location;
|
18 |
drop table if exists site_device;
|
10 |
drop table if exists location_device;
|
- |
|
11 |
drop table if exists mapping;
|
19 |
drop table if exists temp;
|
12 |
drop table if exists owner;
|
- |
|
13 |
drop table if exists owner_device;
|
- |
|
14 |
drop table if exists owner_location;
|
- |
|
15 |
drop view if exists view_device;
|
- |
|
16 |
drop view if exists view_device_device;
|
- |
|
17 |
drop view if exists view_device_location_owner_type;
|
20 |
drop view if exists view_device_types;
|
18 |
drop view if exists view_device_types;
|
21 |
drop view if exists view_device_site_client_type;
|
19 |
drop view if exists view_location_device;
|
- |
|
20 |
drop view if exists view_owner_device;
|
- |
|
21 |
drop view if exists view_owner_location;
|
22 |
|
22 |
|
23 |
*/
|
23 |
*/
|
24 |
|
24 |
|
25 |
/*
|
25 |
/*
|
26 |
The base install of CAMP2.
|
26 |
The base install of CAMP2.
|
Line 74... |
Line 74... |
74 |
) comment = 'Menus for the application';
|
74 |
) comment = 'Menus for the application';
|
75 |
|
75 |
|
76 |
/*
|
76 |
/*
|
77 |
insert the menu options for the main program
|
77 |
insert the menu options for the main program
|
78 |
*/
|
78 |
*/
|
79 |
insert into camp2._menu values (null,null,'Home', '/index.php', 'menu_home' );
|
79 |
insert into _menu values (null,null,'Home', '/index.php', 'menu_home' );
|
80 |
insert into camp2._menu select null,_menu_id,'Owners', '/index.php?module=Owner', 'menu_owner' from camp2._menu where caption = 'Home';
|
80 |
insert into _menu select null,_menu_id,'Owners', '/index.php?module=Owner', 'menu_owner' from _menu where caption = 'Home';
|
81 |
insert into camp2._menu select null,_menu_id,'Locations', '/index.php?module=Location', 'menu_location' from camp2._menu where caption = 'Home';
|
81 |
insert into _menu select null,_menu_id,'Locations', '/index.php?module=Location', 'menu_location' from _menu where caption = 'Home';
|
82 |
insert into camp2._menu select null,_menu_id,'Devices', '/index.php?module=Device', 'menu_device' from camp2._menu where caption = 'Home';
|
82 |
insert into _menu select null,_menu_id,'Devices', '/index.php?module=Device', 'menu_device' from _menu where caption = 'Home';
|
83 |
insert into camp2._menu values (null,null,'Reports', '/index.php?module=report', 'menu_report' );
|
83 |
insert into _menu values (null,null,'Reports', '/index.php?module=report', 'menu_report' );
|
84 |
|
84 |
|
85 |
/*
|
85 |
/*
|
86 |
Modules are allowed to do the same thing for different classes, ie
|
86 |
Modules are allowed to do the same thing for different classes, ie
|
87 |
attribute can have a name for an Owner, and a name for a Location
|
87 |
attribute can have a name for an Owner, and a name for a Location
|
88 |
This table allows us to indicate which base table an entry is for
|
88 |
This table allows us to indicate which base table an entry is for
|