diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-04 12:52:49 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-04 12:52:49 -0300 |
commit | 54d8c81fefdb566c2f317afd0142cade0273bdbc (patch) | |
tree | f1d77594855b8d706ca557ecdd551b4a0c16e524 /activerecord/test/schema | |
parent | b9774a594339d5ac92503d91d180d88ec1faf436 (diff) | |
parent | 933063188870347b59b35d4f96df21864d0f8f0b (diff) | |
download | rails-54d8c81fefdb566c2f317afd0142cade0273bdbc.tar.gz rails-54d8c81fefdb566c2f317afd0142cade0273bdbc.tar.bz2 rails-54d8c81fefdb566c2f317afd0142cade0273bdbc.zip |
Merge pull request #12016 from roderickvd/uuid_fixes
Auto-generate stable fixture UUIDs on PostgreSQL
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/adapters/postgresql/uuid_test.rb
activesupport/CHANGELOG.md
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index a9c4980283..c30f9ec4c4 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -17,6 +17,15 @@ ActiveRecord::Schema.define do ActiveRecord::Base.connection.create_table(*args, &block) ActiveRecord::Base.connection.execute "SET GENERATOR #{args.first}_seq TO 10000" end + when "PostgreSQL" + enable_uuid_ossp!(ActiveRecord::Base.connection) + create_table :uuid_parents, id: :uuid, force: true do |t| + t.string :name + end + create_table :uuid_children, id: :uuid, force: true do |t| + t.string :name + t.uuid :uuid_parent_id + end end |