Add Postgresql warning when using DROP INDEX without CONCURRENTLY keyword
This commit is contained in:
1 parent
70db245df3
commit
2bf87c0659
2 files changed
+20
-3
No files matched your search
@@ -13,4 +13,11 @@ class PostgresqlAnalyser(BaseAnalyser):
|
||||
"mode": "one_liner",
|
||||
"type": "warning",
|
||||
},
|
||||
{
|
||||
"code": "DROP_INDEX",
|
||||
"fn": lambda sql, **kw: re.search("DROP INDEX", sql) and not re.search("INDEX CONCURRENTLY", sql),
|
||||
"msg": "DROP INDEX locks table",
|
||||
"mode": "one_liner",
|
||||
"type": "warning",
|
||||
},
|
||||
]
|
||||
Reference in new issue
Block a user