[Non-Backfill Approach] Add a temporary column with default value of 1 and then rename

transaction do
    add a column organization_id_tmp default 1 not null
    drop organization_id
    rename organization_id_tmp to organization_id
end
  • Re-add FK and unique index
Edited by Kinshuk Singh