Sha256: d64ccdcb5600bbf02375b9ce73af9649a70c7914de7fd2c47b083015ada66a82
Contents?: true
Size: 390 Bytes
Versions: 6
Compression:
Stored size: 390 Bytes
Contents
class RemoveDefaultValueAndClearSettings < ActiveRecord::Migration def up remove_column :settings, :default_value # Truncate settings table if connection.adapter_name.downcase == "sqlite" execute("DELETE FROM settings") else # mysql and postgres execute("TRUNCATE settings") end end def down add_column :settings, :default_value, :text end end
Version data entries
6 entries across 6 versions & 2 rubygems