• Yannis Roussos's avatar
    Use check constraints instead of change_column_null · 44d881b9
    Yannis Roussos authored
    - Add migration helpers for managing NOT NULL
      constraints (add, validate, remove, check if exists)
    - Update migration helpers to use add_not_null_constraint to
      enforce NOT NULL for existing columns instead of change_column_null
    - Update the disable_statement_timeout migration helper to
      allow calling it multiple times, even from inside a block
      of another disable_statement_timeout, without resetting the
      timout before the outer block finishes
    - Update the Database Guides with a reference to add_not_null_constraint
    44d881b9
migration_helpers.rb 55.3 KB