We were using the `timestamps` method most of the time, but sometimes we were creating the columns manually. Note editing past migrations if fine as long as the SQL they generate remains identical, which is the case here.
15 lines
350 B
Ruby
15 lines
350 B
Ruby
class CreateBudgets < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :budgets do |t|
|
|
t.string "name", limit: 30
|
|
t.text "description"
|
|
t.string "currency_symbol", limit: 10
|
|
|
|
t.string "phase", default: "on_hold", limit: 15
|
|
t.boolean "valuating", default: false
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|