File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,6 @@ To add a new value (before or after an existing one) or to rename a value you sh
315
315
316
316
``` ruby
317
317
# 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!
319
318
disable_ddl_transaction!
320
319
321
320
def up
@@ -326,6 +325,8 @@ def up
326
325
end
327
326
```
328
327
328
+ NOTE: ` ALTER TYPE ... ADD VALUE ` cannot be executed inside of a transaction block so here we are using ` disable_ddl_transaction! `
329
+
329
330
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.
330
331
331
332
Hint: to show all the values of the all enums you have, you should call this query in ` bin/rails db ` or ` psql ` console:
You can’t perform that action at this time.
0 commit comments