File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
activerecord/lib/active_record/connection_adapters/postgresql Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,10 @@ module ColumnMethods
16
16
# t.timestamps
17
17
# end
18
18
#
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.
23
20
#
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+:
35
23
#
36
24
# create_table :stuffs, id: false do |t|
37
25
# t.primary_key :id, :uuid, default: nil
You can’t perform that action at this time.
0 commit comments