create function migrate_driver_to_old_table () returns trigger language plpgsql as $$ BEGIN IF NEW.driver_uuid IS NULL THEN RETURN NULL; END IF; DELETE FROM