From e6cd33ee57465db13e46d7a52d935e6abdd72bef Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Mon, 6 Apr 2020 17:05:36 +0800 Subject: [PATCH] Increase max characters for locale in spree_users There are many locales that have six (6) characters. --- ...85833_increase_characters_of_locale_in_spree_users.rb | 9 +++++++++ db/schema.rb | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20200406085833_increase_characters_of_locale_in_spree_users.rb diff --git a/db/migrate/20200406085833_increase_characters_of_locale_in_spree_users.rb b/db/migrate/20200406085833_increase_characters_of_locale_in_spree_users.rb new file mode 100644 index 0000000000..5cac7dab5b --- /dev/null +++ b/db/migrate/20200406085833_increase_characters_of_locale_in_spree_users.rb @@ -0,0 +1,9 @@ +class IncreaseCharactersOfLocaleInSpreeUsers < ActiveRecord::Migration + def up + change_column :spree_users, :locale, :string, limit: 6 + end + + def down + change_column :spree_users, :locale, :string, limit: 5 + end +end diff --git a/db/schema.rb b/db/schema.rb index 40badc11bf..a1f2124d59 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20200327105910) do +ActiveRecord::Schema.define(:version => 20200406085833) do create_table "adjustment_metadata", :force => true do |t| t.integer "adjustment_id" @@ -1045,7 +1045,7 @@ ActiveRecord::Schema.define(:version => 20200327105910) do t.datetime "reset_password_sent_at" t.string "api_key", :limit => 40 t.integer "enterprise_limit", :default => 5, :null => false - t.string "locale", :limit => 5 + t.string "locale", :limit => 6 t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at"