Holy db migrations batman
This commit is contained in:
@@ -115,7 +115,7 @@ async def backfill_advertising_account_ids(
|
||||
sql = text(
|
||||
"UPDATE reservations "
|
||||
"SET meta_account_id = :meta_account "
|
||||
"WHERE hotel_code = :hotel_id "
|
||||
"WHERE hotel_id = :hotel_id "
|
||||
"AND fbclid IS NOT NULL "
|
||||
"AND fbclid != '' "
|
||||
"AND (meta_account_id IS NULL OR meta_account_id = '')"
|
||||
@@ -141,7 +141,7 @@ async def backfill_advertising_account_ids(
|
||||
sql = text(
|
||||
"UPDATE reservations "
|
||||
"SET google_account_id = :google_account "
|
||||
"WHERE hotel_code = :hotel_id "
|
||||
"WHERE hotel_id = :hotel_id "
|
||||
"AND gclid IS NOT NULL "
|
||||
"AND gclid != '' "
|
||||
"AND (google_account_id IS NULL OR google_account_id = '')"
|
||||
@@ -215,7 +215,7 @@ async def backfill_acked_requests_username(
|
||||
UPDATE acked_requests
|
||||
SET username = :username
|
||||
WHERE unique_id IN (
|
||||
SELECT md5_unique_id FROM reservations WHERE hotel_code = :hotel_id
|
||||
SELECT md5_unique_id FROM reservations WHERE hotel_id = :hotel_id
|
||||
)
|
||||
AND username IS NULL
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user