diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-02-29 20:09:55 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-03-04 23:25:50 +0900 |
commit | a449b073430b28644b4e2a5e6a1b5615c1b2d67b (patch) | |
tree | 10f601e682d70fcf7666bff1c920f1012f26890f /activerecord/lib/active_record | |
parent | c577657f6de64b743b12a21108dc9cc5cfc35098 (diff) | |
download | rails-a449b073430b28644b4e2a5e6a1b5615c1b2d67b.tar.gz rails-a449b073430b28644b4e2a5e6a1b5615c1b2d67b.tar.bz2 rails-a449b073430b28644b4e2a5e6a1b5615c1b2d67b.zip |
Fix bigserial appears with limit 8 for schema dumper
Before:
```ruby
create_table "postgresql_big_serials", force: :cascade do |t|
t.bigserial "seq", limit: 8, null: false
end
```
After:
```ruby
create_table "postgresql_big_serials", force: :cascade do |t|
t.bigserial "seq", null: false
end
```
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb index 19761618cf..5cb2bbbf18 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb @@ -41,6 +41,10 @@ module ActiveRecord end end + def schema_limit(column) + super unless schema_type(column) == :bigserial + end + def schema_expression(column) super unless column.serial? end |