diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-14 00:56:30 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-14 01:46:35 -0300 |
commit | 9541a72858989acfd482a9b7775c6eac10f75c02 (patch) | |
tree | 6234023566dbcb9bcce37426f0a31665e08056ae /activerecord/lib/active_record | |
parent | 2384148cbe48b9e5fc795cffdaf24981f8ec464d (diff) | |
download | rails-9541a72858989acfd482a9b7775c6eac10f75c02.tar.gz rails-9541a72858989acfd482a9b7775c6eac10f75c02.tar.bz2 rails-9541a72858989acfd482a9b7775c6eac10f75c02.zip |
Dump the default function when the primary key is uuid
Fixes #12489
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index 8986d255cd..811babfc31 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -123,6 +123,7 @@ HEADER tbl.print %Q(, primary_key: "#{pk}") elsif pkcol.sql_type == 'uuid' tbl.print ", id: :uuid" + tbl.print %Q(, default: "#{pkcol.default_function}") if pkcol.respond_to?(:default_function) && pkcol.default_function end else tbl.print ", id: false" |