From 600195a72634ca7a7507ea002299b679807fc9f1 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 14 Jan 2025 11:09:58 +1100 Subject: [PATCH] Allow null for customers.created_manually Some production database don't allow null for customers.created_maually, we want to allow it to bring the database inline with schema.rb --- .../20250113055412_customers_created_manually_remove_null.rb | 5 +++++ db/schema.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20250113055412_customers_created_manually_remove_null.rb diff --git a/db/migrate/20250113055412_customers_created_manually_remove_null.rb b/db/migrate/20250113055412_customers_created_manually_remove_null.rb new file mode 100644 index 00000000000..75150131e45 --- /dev/null +++ b/db/migrate/20250113055412_customers_created_manually_remove_null.rb @@ -0,0 +1,5 @@ +class CustomersCreatedManuallyRemoveNull < ActiveRecord::Migration[7.0] + def change + change_column_null :customers, :created_manually, true + end +end diff --git a/db/schema.rb b/db/schema.rb index 37bab4a1e64..ea7efe830f3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_11_13_185651) do +ActiveRecord::Schema[7.0].define(version: 2025_01_13_055412) do # These are extensions that must be enabled in order to support this database enable_extension "pg_stat_statements" enable_extension "plpgsql"