Increased template size to 10mb to also store inline images in there.

This commit is contained in:
Martin Edenhofer 2016-09-21 19:38:32 +02:00
parent 63e543dfd4
commit 3280a2c5e1
3 changed files with 11 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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