Backfill null renewals from created_at and use now when create omits the date. Co-authored-by: Cursor <cursoragent@cursor.com>
6 lines
150 B
SQL
6 lines
150 B
SQL
-- Default annual renewal to business created date when unset.
|
|
|
|
UPDATE businesses
|
|
SET annual_renewal_at = created_at
|
|
WHERE annual_renewal_at IS NULL;
|