Sha256: 113c79b1e8035edff1ec95a38fdcfcffe4da1c482053374b47712f9429e9dbe4

Contents?: true

Size: 563 Bytes

Versions: 2

Compression:

Stored size: 563 Bytes

Contents

# XXX: https://github.com/waka/activerecord-mysql-unsigned/blob/v0.3.1/lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/abstract/schema_definitions.rb#L14
class ActiveRecord::ConnectionAdapters::TableDefinition
  alias primary_key_without_unsigned primary_key

  def primary_key(name, type = :primary_key, options = {})
    if options.has_key?(:id)
      primary_key_without_unsigned(name, type, options)
    else
      primary_key_without_unsigned(name, type, options.merge(primary_key: true).reverse_merge(unsigned: true))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ridgepole-0.6.0.beta4 lib/ridgepole/ext/mysql_awesome.rb
ridgepole-0.5.3.beta4 lib/ridgepole/ext/mysql_awesome.rb