File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,35 @@ CREATE INDEX CONCURRENTLY users_email_idx ON users (email);
2323```
2424
2525``` sh
26+ code-block.sql:1:1 lint/safety/preferRobustStmts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27+
28+ ! Concurrent index creation should use IF NOT EXISTS.
29+
30+ > 1 │ CREATE INDEX CONCURRENTLY users_email_idx ON users (email);
31+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32+ 2 │
33+
34+ i Add IF NOT EXISTS to make the migration re-runnable if it fails.
35+
36+
2637` ` `
2738
2839` ` ` sql
2940DROP INDEX CONCURRENTLY users_email_idx;
3041` ` `
3142
3243` ` ` sh
44+ code-block.sql:1:1 lint/safety/preferRobustStmts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45+
46+ ! Concurrent drop should use IF EXISTS.
47+
48+ > 1 │ DROP INDEX CONCURRENTLY users_email_idx;
49+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+ 2 │
51+
52+ i Add IF EXISTS to make the migration re-runnable if it fails.
53+
54+
3355` ` `
3456
3557# ## Valid
You can’t perform that action at this time.
0 commit comments