Rake DB Commands

发布于6月前 阅读65次
0 条评论

default: &default
  adapter: postgresql
  encoding: unicode
  username: username
  password: password
  host: localhost
  port: 5432

development:
  <<: *default
  database: story_dev

test:
  <<: *default
  database: story_test

production:
  <<: *default
  database: story
class CreateRoles < ActiveRecord::Migration
  def change
    create_table :roles do |t|
      t.integer :role # we will change this to t.string :role
      t.references :user
      t.timestamps
    end
  end
end

 Originally published on Kolosek Blog.

需要 登录 后回复方可回复, 如果你还没有账号你可以 注册 一个帐号。