From f31bebdda746f4a630dc4994f85372b36a3d34df Mon Sep 17 00:00:00 2001 From: phyusin Date: Fri, 12 Oct 2018 16:33:44 +0630 Subject: [PATCH] change varchar to text for sale_audits --- db/migrate/20170403174111_create_sale_audits.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/migrate/20170403174111_create_sale_audits.rb b/db/migrate/20170403174111_create_sale_audits.rb index 7e7f0b8c..eadba565 100755 --- a/db/migrate/20170403174111_create_sale_audits.rb +++ b/db/migrate/20170403174111_create_sale_audits.rb @@ -9,9 +9,11 @@ class CreateSaleAudits < ActiveRecord::Migration[5.1] t.string :action_by, :null => false t.string :approved_by, :null => true t.datetime :approved_at, :null => true - t.string :remark, :index => true + t.text :remark t.timestamps end - add_index :sale_audits, [:sale_id, :action, :action_at, :remark] + + add_index :sale_audits, :remark, remark: 'remark', type: :fulltext + add_index :sale_audits, [:sale_id, :action, :action_at] end end