Skip to content

Commit 740f0f1

Browse files
authored
Merge pull request rails#47251 from zzak/psql-move-comment-to-note
Move comment to out of codeblock to note
2 parents f8e3bde + 33489d6 commit 740f0f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

guides/source/active_record_postgresql.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ To add a new value (before or after an existing one) or to rename a value you sh
315315

316316
```ruby
317317
# db/migrate/20150720144913_add_new_state_to_articles.rb
318-
# NOTE: ALTER TYPE ... ADD VALUE cannot be executed inside of a transaction block so here we are using disable_ddl_transaction!
319318
disable_ddl_transaction!
320319

321320
def up
@@ -326,6 +325,8 @@ def up
326325
end
327326
```
328327

328+
NOTE: `ALTER TYPE ... ADD VALUE` cannot be executed inside of a transaction block so here we are using `disable_ddl_transaction!`
329+
329330
NOTE: Enum values [can't be dropped or reordered](https://www.postgresql.org/docs/current/datatype-enum.html). Adding a value is not easily reversed.
330331

331332
Hint: to show all the values of the all enums you have, you should call this query in `bin/rails db` or `psql` console:

0 commit comments

Comments
 (0)