Sha256: a52e9ed304615409f3020635ebdd05e7be52ee5708135a0c788214c686ca8a39
Contents?: true
Size: 392 Bytes
Versions: 16
Compression:
Stored size: 392 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
16 entries across 16 versions & 1 rubygems