diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2014-11-16 03:08:46 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-02-24 01:53:54 +0900 |
commit | b8d320c1294aa582ff34e1b15782c084edc0386b (patch) | |
tree | ffbc62d8615b78e8f18c9d27b492777f9e3382f3 /activerecord/CHANGELOG.md | |
parent | e71f5dad4e0d27afbcc091173bee20bd6f4d2a4e (diff) | |
download | rails-b8d320c1294aa582ff34e1b15782c084edc0386b.tar.gz rails-b8d320c1294aa582ff34e1b15782c084edc0386b.tar.bz2 rails-b8d320c1294aa582ff34e1b15782c084edc0386b.zip |
Allow `:limit` option for MySQL bigint primary key support
Example:
create_table :foos, id: :primary_key, limit: 8 do |t|
end
# or
create_table :foos, id: false do |t|
t.column :id, limit: 8
end
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 131fdc62aa..51c047479f 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,18 @@ +* Allow `:limit` option for MySQL bigint primary key support. + + Example: + + create_table :foos, id: :primary_key, limit: 8 do |t| + end + + # or + + create_table :foos, id: false do |t| + t.primary_key :id, limit: 8 + end + + *Ryuta Kamizono* + * `belongs_to` will now trigger a validation error by default if the association is not present. You can turn this off on a per-association basis with `optional: true`. (Note this new default only applies to new Rails apps that will be generated with |