Ответ 1
class YourMigration < ActiveRecord::Migration
def up
change_column :users, :login, :string, :limit => 55
end
def down
change_column :users, :login, :string, :limit => 40
end
end
Стол для входа в таблицу My users - тип String с лимитом в 40 символов. Теперь я планирую увеличить лимит до 55 символов.
Кто-нибудь, пожалуйста, дайте мне знать, как мы можем увеличить этот предел, используя миграцию ROR.
Спасибо, Sravan
class YourMigration < ActiveRecord::Migration
def up
change_column :users, :login, :string, :limit => 55
end
def down
change_column :users, :login, :string, :limit => 40
end
end
class YourMigration < ActiveRecord::Migration
def change
change_column :users, :login, :string, :limit => 55
end
end