Subversion Repositories SmartDukaan

Rev

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

Rev 36681 Rev 36711
Line 10... Line 10...
10
 
10
 
11
INSERT INTO auth.menu (display_text, description, parent_menu_id, sequence, action_class)
11
INSERT INTO auth.menu (display_text, description, parent_menu_id, sequence, action_class)
12
VALUES ('Base Location', 'Manage auth user base/home locations', 175, 7, 'base-location');
12
VALUES ('Base Location', 'Manage auth user base/home locations', 175, 7, 'base-location');
13
 
13
 
14
 
14
 
15
# new update
-
 
16
 
-
 
17
ALTER TABLE user.auth_user_location
15
ALTER TABLE user.auth_user_location
18
    ADD COLUMN is_default TINYINT(1) NOT NULL DEFAULT 0;
16
    ADD COLUMN is_default TINYINT(1) NOT NULL DEFAULT 0;
19
 
17
 
20
UPDATE user.auth_user_location ul
18
UPDATE user.auth_user_location ul
21
    INNER JOIN (SELECT auth_user_id, MAX(id) AS max_id
19
    INNER JOIN (SELECT auth_user_id, MAX(id) AS max_id
Line 25... Line 23...
25
SET ul.is_default = 1
23
SET ul.is_default = 1
26
WHERE ul.location_type = 'BASE';
24
WHERE ul.location_type = 'BASE';
27
 
25
 
28
-- Optional helper index
26
-- Optional helper index
29
CREATE INDEX idx_aul_user_type_default
27
CREATE INDEX idx_aul_user_type_default
30
    ON user.auth_user_location (auth_user_id, location_type, is_default);
-
 
31
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;
-
 
36
32
37