activerecord-mysql-unsigned:启用使用整数类型中的“ unsigned”选项来迁移ActiveRecord

时间:2021-05-24 22:26:17
【文件属性】:
文件名称:activerecord-mysql-unsigned:启用使用整数类型中的“ unsigned”选项来迁移ActiveRecord
文件大小:16KB
文件格式:ZIP
更新时间:2021-05-24 22:26:17
Ruby Activerecord :: Mysql ::未签名 为ActiveRecordMySQL2适配器将无符号选项添加到整数类型。 支持版本 5.0 > ActiveRecord::VERSION >= 3.2 安装 将此行添加到您的应用程序的Gemfile中: gem 'activerecord-mysql-unsigned' 然后执行: $ bundle 或将其自己安装为: $ gem install activerecord-mysql-unsigned 用法 在迁移中,您可以定义整数字段,例如: class CreateUsersTable < ActiveRecord::Migration def self.change create_table :users, force: true do |t| t.string :name, nu
【文件预览】:
activerecord-mysql-unsigned-master
----.gitignore(187B)
----activerecord-mysql-unsigned.gemspec(1KB)
----.travis.yml(153B)
----LICENSE.txt(1KB)
----spec()
--------bigint_primary_key_spec.rb(261B)
--------support()
--------after_option_spec.rb(449B)
--------unsigned_spec.rb(2KB)
--------spec_helper.rb(451B)
----README.md(2KB)
----vendor()
--------.keep(0B)
----lib()
--------activerecord-mysql-unsigned()
--------activerecord-mysql-unsigned.rb(266B)
----Gemfile(180B)
----Rakefile(247B)

网友评论