DEV: Support nullable column property modification (#32978)

By default, rails makes timestamp columns (`created_at` and
`updated_at`) non-nullable, we also have some required core and plugins
columns we wouldn't necessarily want to enforce in the intermediate DB
schema. It'll be better to set the default values for these during
import instead of enforcing these at the converter level.

This change adds support for globally modifying a column’s `nullable`
state, defaulting all `created_at` columns to be `nullable` while
allowing for table level overrides.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
This commit is contained in:
Selase Krakani
2025-06-01 22:39:18 +00:00
committed by GitHub
parent fc9946f595
commit c31035caf5
7 changed files with 47 additions and 7 deletions

View File

@ -48,7 +48,7 @@ module Migrations::Database::IntermediateDB
approved: nil,
approved_at: nil,
approved_by_id: nil,
created_at:,
created_at: nil,
date_of_birth: nil,
first_seen_at: nil,
flair_group_id: nil,