Conversation
036548b to
176a2e6
Compare
vkrasnovyd
left a comment
There was a problem hiding this comment.
It's impressive how much you've simplified the equal fields helper while adding more logic to it.
|
|
||
|
|
||
| def get_schema_sql_dict() -> dict[str, dict[str, str]]: | ||
| def get_schema_sql_dict() -> dict[str, dict[str, Any]]: |
There was a problem hiding this comment.
Did the type really change? If no, please return a more narrow type definition.
There was a problem hiding this comment.
In the case of triggers the type can also be of dict[str, dict[str, str]] instead of str since it is nesting arround field and trigger group also. That's why I chose Any.
There was a problem hiding this comment.
str | dict[str, dict[str, str]] would cover this case too without making type definition too wide.
There was a problem hiding this comment.
I will create a type like this.
TriggerSqlDict = dict[str, dict[str, dict[str, str]]]
mypy wouldn't accept it like you suggested which seems bugged to me.
This adds the ability to edit equal fields.
For convenience reasons added constant and max min constraint generation also.
Also recreates renamed intermediate tables since these were necessary to be excluded for drop during equal fields recreation.