Skip to content

Commit c356b42

Browse files
nanayap8
authored andcommitted
Update PostgreSQL UUID documentation [ci-skip]
The function has been moved to core since version 13.
1 parent 2098cb0 commit c356b42

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,10 @@ module ColumnMethods
1616
# t.timestamps
1717
# end
1818
#
19-
# By default, this will use the <tt>gen_random_uuid()</tt> function from the
20-
# +pgcrypto+ extension. As that extension is only available in
21-
# PostgreSQL 9.4+, for earlier versions an explicit default can be set
22-
# to use <tt>uuid_generate_v4()</tt> from the +uuid-ossp+ extension instead:
19+
# By default, this will use the <tt>gen_random_uuid()</tt> function.
2320
#
24-
# create_table :stuffs, id: false do |t|
25-
# t.primary_key :id, :uuid, default: "uuid_generate_v4()"
26-
# t.uuid :foo_id
27-
# t.timestamps
28-
# end
29-
#
30-
# To enable the appropriate extension, which is a requirement, use
31-
# the +enable_extension+ method in your migrations.
32-
#
33-
# To use a UUID primary key without any of the extensions, set the
34-
# +:default+ option to +nil+:
21+
# To use a UUID primary key without any defaults, set the +:default+
22+
# option to +nil+:
3523
#
3624
# create_table :stuffs, id: false do |t|
3725
# t.primary_key :id, :uuid, default: nil

0 commit comments

Comments
 (0)