Sha256: 963ef591a68db4a17dff3bc69d609936fd01ffa949e4a5b80ff11f99718b38dd
Contents?: true
Size: 308 Bytes
Versions: 3
Compression:
Stored size: 308 Bytes
Contents
class StatesToString < ActiveRecord::Migration def change change_column :flyboy_goals, :status, :string Flyboy::Goal.where(status: 0).update_all(status: "pending") Flyboy::Goal.where(status: 1).update_all(status: "open") Flyboy::Goal.where(status: 2).update_all(status: "closed") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
flyboy-0.0.3 | db/migrate/20150407070804_states_to_string.rb |
flyboy-0.0.2 | db/migrate/20150407070804_states_to_string.rb |
flyboy-0.0.1 | db/migrate/20150407070804_states_to_string.rb |