26 lines
1.5 KiB
SQL
26 lines
1.5 KiB
SQL
-- Förderer - wir für bruckmühle (8)
|
|
INSERT IGNORE INTO bm.user_usercategory (usercategory_id, user_id)
|
|
SELECT 1, (select (select id from bm.users where email = old.email limit 1) from old.bruckm_ticketcustomer as old where id=a.customerId)
|
|
FROM old.bruckm_ticketcustomergroupmemberships as a where groupId=32;
|
|
|
|
-- Galerie (185)
|
|
INSERT IGNORE INTO bm.user_usercategory (usercategory_id, user_id)
|
|
SELECT 2, (select (select id from bm.users where email = old.email limit 1) from old.bruckm_ticketcustomer as old where id=a.customerId)
|
|
FROM old.bruckm_ticketcustomergroupmemberships as a where groupId=4;
|
|
|
|
-- Mitglieder - wir für BM (70)
|
|
INSERT IGNORE INTO bm.user_usercategory (usercategory_id, user_id)
|
|
SELECT 4, (select (select id from bm.users where email = old.email limit 1) from old.bruckm_ticketcustomer as old where id=a.customerId)
|
|
FROM old.bruckm_ticketcustomergroupmemberships as a where groupId=34;
|
|
|
|
-- Stadtamt (126)
|
|
INSERT IGNORE INTO bm.user_usercategory (usercategory_id, user_id)
|
|
SELECT 5, (select (select id from bm.users where email = old.email limit 1) from old.bruckm_ticketcustomer as old where id=a.customerId)
|
|
FROM old.bruckm_ticketcustomergroupmemberships as a where groupId=21;
|
|
|
|
-- Kuka (292)
|
|
INSERT IGNORE INTO bm.user_usercategory (usercategory_id, user_id)
|
|
SELECT 3, (select (select id from bm.users where email = old.email limit 1) from old.bruckm_ticketcustomer as old where id=a.customerId)
|
|
FROM old.bruckm_ticketcustomergroupmemberships as a where groupId=8;
|
|
|