Closed milmazz closed 1 year ago
@Artur-Sulej, I will work on a proposal PR to add this checker since I'm running into the same issue.
I think we will need to do this to go through the entire code_ast
for the module and see if those module attributes exist and their values are true,
and one of the database operations should be an index concurrently.
Should we show an error per attribute? what the name of these errors looks like (index_concurrently_without_MODULE_ATTR_NAME)?
What do you think?
@Artur-Sulej After closing MR #14. I think we can close this issue as well.
Hello 👋
First, thanks for working on this library. It seems helpful to enforce good practices while you do data migrations. In particular, I'm interested in the
index_not_concurrently
check. On my quick review, it seems to detect the lack of theconcurrently
option in yourindex
., but apparently, the check doesn't verify for:Both module attributes are recommended when you add or drop an index concurrently, from the Ecto docs we have:
Also, based on the last paragraph, the calls that should be allowed while you have disabled the DDL transactions and the migration lock are
create/drop index(...., concurrently: true)
, but I don't know if that's feasible with this check.