WIA/db/migrate/20120503051402_set_default_visits.rb

9 lines
235 B
Ruby

class SetDefaultVisits < ActiveRecord::Migration
def up
change_column :links, :visits, :integer, :null => false, :default => 0
end
def down
raise ActiveRecord::IrreversibleMigration, "Can't remove the default"
end
end