diff --git a/db/migrate/20120101000001_create_base.rb b/db/migrate/20120101000001_create_base.rb index 481cd6c01..c73d971e4 100644 --- a/db/migrate/20120101000001_create_base.rb +++ b/db/migrate/20120101000001_create_base.rb @@ -235,7 +235,7 @@ class CreateBase < ActiveRecord::Migration t.string :client_id, null: false t.string :key, limit: 100, null: false t.string :callback, limit: 100, null: false - t.text :state, limit: 2.megabytes + 1, null: true + t.text :state, limit: 20.megabytes + 1, null: true t.string :params, limit: 2000, null: true t.integer :prio, null: false t.boolean :notify, null: false, default: false diff --git a/db/migrate/20120101000010_create_ticket.rb b/db/migrate/20120101000010_create_ticket.rb index 40dcc06a5..57224c875 100644 --- a/db/migrate/20120101000010_create_ticket.rb +++ b/db/migrate/20120101000010_create_ticket.rb @@ -322,7 +322,7 @@ class CreateTicket < ActiveRecord::Migration create_table :templates do |t| t.references :user, null: true t.column :name, :string, limit: 250, null: false - t.column :options, :string, limit: 2500, null: false + t.column :options, :text, limit: 10.megabytes + 1, null: false t.column :updated_by_id, :integer, null: false t.column :created_by_id, :integer, null: false t.timestamps limit: 3, null: false diff --git a/db/migrate/20160919000001_template_update.rb b/db/migrate/20160919000001_template_update.rb new file mode 100644 index 000000000..e8118c720 --- /dev/null +++ b/db/migrate/20160919000001_template_update.rb @@ -0,0 +1,9 @@ + +class TemplateUpdate < ActiveRecord::Migration + def up + # return if it's a new setup + return if !Setting.find_by(name: 'system_init_done') + + change_column :templates, :options, :text, limit: 10.megabytes + 1, null: true + end +end