小编sys*_*fig的帖子

rails db migration,undefined method`to_sym',无法弄清楚语法

这是我最初的迁移:

class CreateUsers < ActiveRecord::Migration
  def self.up
    ActiveRecord::Base.transaction do
      create_table "users", :force => true do |t|
        t.string :login, :limit => 40
        t.string :name, :limit => 100, :default => '', :null => true
        t.string :email, :limit => 100
        t.string :crypted_password, :limit => 40
        t.string :salt, :limit => 40
        t.string :remember_token, :limit => 40
        t.datetime :remember_token_expires_at
        t.string :activation_code, :limit => 40
        t.datetime :activated_at, :datetime
        t.string :state, :null => :no, :default => 'passive'
        t.datetime :deleted_at
        t.integer :occupation_id, :null => :yes
        t.datetime :paid_up_to_date, :date …
Run Code Online (Sandbox Code Playgroud)

migration ruby-on-rails

22
推荐指数
1
解决办法
1万
查看次数

标签 统计

migration ×1

ruby-on-rails ×1