salix/db/changes/10180-holyWeek/01-migrateFromTicketToTicke...

7 lines
194 B
SQL

UPDATE vn.ticketWeekly tw
JOIN vn.ticket t ON t.id = tw.ticketFk
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
SET tw.agencyModeFk = t.agencyModeFk
WHERE am.name NOT LIKE '%turno%';