From f449f1c107746018041c8d25b9e12dfbe89cf062 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 28 Feb 2018 10:49:20 +0200 Subject: [PATCH] Change `registrars.country_code` DB column to NOT NULL #623 --- ...80228084818_change_registrars_country_code_to_not_null.rb | 5 +++++ db/structure.sql | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20180228084818_change_registrars_country_code_to_not_null.rb diff --git a/db/migrate/20180228084818_change_registrars_country_code_to_not_null.rb b/db/migrate/20180228084818_change_registrars_country_code_to_not_null.rb new file mode 100644 index 000000000..16a66e989 --- /dev/null +++ b/db/migrate/20180228084818_change_registrars_country_code_to_not_null.rb @@ -0,0 +1,5 @@ +class ChangeRegistrarsCountryCodeToNotNull < ActiveRecord::Migration + def change + change_column_null :registrars, :country_code, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 46b433aa7..00eac536d 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2424,7 +2424,7 @@ CREATE TABLE registrars ( phone character varying, email character varying, billing_email character varying, - country_code character varying, + country_code character varying NOT NULL, state character varying, city character varying, street character varying, @@ -5122,3 +5122,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180228070431'); INSERT INTO schema_migrations (version) VALUES ('20180228074442'); +INSERT INTO schema_migrations (version) VALUES ('20180228084818'); +