Subversion Repositories SmartDukaan

Rev

Rev 36681 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
36644 ranu 1
UPDATE auth.menu
2
SET display_text = 'Lead Visits'
3
WHERE action_class = 'visit-approvals';
4
 
5
ALTER TABLE user.beat
36650 ranu 6
    ADD UNIQUE KEY uk_beat_user_name (auth_user_id, name);
7
 
8
INSERT INTO auth.menu (display_text, description, parent_menu_id, sequence, action_class)
36655 ranu 9
VALUES ('Beat Day View', 'View all beats running for a user on a date', 175, 6, 'beat-plan-dayview');
10
 
11
INSERT INTO auth.menu (display_text, description, parent_menu_id, sequence, action_class)
36681 ranu 12
VALUES ('Base Location', 'Manage auth user base/home locations', 175, 7, 'base-location');
13
 
14
 
15
ALTER TABLE user.auth_user_location
16
    ADD COLUMN is_default TINYINT(1) NOT NULL DEFAULT 0;
17
 
18
UPDATE user.auth_user_location ul
19
    INNER JOIN (SELECT auth_user_id, MAX(id) AS max_id
20
                FROM user.auth_user_location
21
                WHERE location_type = 'BASE'
22
                GROUP BY auth_user_id) latest ON ul.id = latest.max_id
23
SET ul.is_default = 1
24
WHERE ul.location_type = 'BASE';
25
 
26
-- Optional helper index
27
CREATE INDEX idx_aul_user_type_default
36711 ranu 28
    ON user.auth_user_location (auth_user_id, location_type, is_default);
29
 
30
 
31
#new update 0n 27
32
 
33
ALTER TABLE user.beat_route
34
    ADD COLUMN distance_from_prev_km DOUBLE NULL AFTER active,
35
    ADD COLUMN time_from_prev_mins   INT    NULL AFTER distance_from_prev_km;