diff --git a/db/migrate/20120101000001_create_base.rb b/db/migrate/20120101000001_create_base.rb index 88a0749fb..2e57b1d2f 100644 --- a/db/migrate/20120101000001_create_base.rb +++ b/db/migrate/20120101000001_create_base.rb @@ -425,7 +425,7 @@ class CreateBase < ActiveRecord::Migration create_table :calendars do |t| t.string :name, limit: 250, null: true t.string :timezone, limit: 250, null: true - t.string :business_hours, limit: 1200, null: true + t.string :business_hours, limit: 3000, null: true t.boolean :default, null: false, default: false t.string :ical_url, limit: 500, null: true t.text :public_holidays, limit: 500.kilobytes + 1, null: true diff --git a/db/migrate/20160719000001_update_calendars.rb b/db/migrate/20160719000001_update_calendars.rb new file mode 100644 index 000000000..cf6f206c5 --- /dev/null +++ b/db/migrate/20160719000001_update_calendars.rb @@ -0,0 +1,9 @@ + +class UpdateCalendars < ActiveRecord::Migration + def up + # return if it's a new setup + return if !Setting.find_by(name: 'system_init_done') + + change_column :calendars, :business_hours, :string, limit: 3000, null: true + end +end