From 9541a72858989acfd482a9b7775c6eac10f75c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 14 Oct 2013 00:56:30 -0300 Subject: Dump the default function when the primary key is uuid Fixes #12489 --- activerecord/lib/active_record/schema_dumper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record') 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" -- cgit v1.2.3