Sha256: 2363530ef9c032ee39748e51e22c3cd4465b2cddf906cd4eefde36b8e866c119
Contents?: true
Size: 771 Bytes
Versions: 5
Compression:
Stored size: 771 Bytes
Contents
class UpdateFactNamesAndValuesToBin < ActiveRecord::Migration def self.up if ActiveRecord::Base.connection.instance_values["config"][:adapter] == "mysql" or ActiveRecord::Base.connection.instance_values["config"][:adapter] == "mysql2" execute %{ALTER TABLE fact_names MODIFY name varchar(255) COLLATE utf8_bin NOT NULL} execute %{ALTER TABLE fact_values MODIFY value varchar(255) COLLATE utf8_bin NOT NULL} end end def self.down if ActiveRecord::Base.connection.instance_values["config"][:adapter] == "mysql" or ActiveRecord::Base.connection.instance_values["config"][:adapter] == "mysql2" execute %{ALTER TABLE fact_names MODIFY name varchar(255)} execute %{ALTER TABLE fact_values MODIFY value varchar(255)} end end end
Version data entries
5 entries across 5 versions & 1 rubygems