(pk_constraint, col)
| 173 | PrimaryKeyConstraint, "_sa_event_column_added_to_pk_constraint" |
| 174 | ) |
| 175 | def _column_added_to_pk_constraint(pk_constraint, col): |
| 176 | if pk_constraint._implicit_generated: |
| 177 | # only operate upon the "implicit" pk constraint for now, |
| 178 | # as we have to force the name to None to reset it. the |
| 179 | # "implicit" constraint will only have a naming convention name |
| 180 | # if at all. |
| 181 | table = pk_constraint.table |
| 182 | pk_constraint.name = None |
| 183 | newname = _constraint_name_for_table(pk_constraint, table) |
| 184 | if newname: |
| 185 | pk_constraint.name = newname |
| 186 | |
| 187 | |
| 188 | @event.listens_for(Constraint, "after_parent_attach") |
nothing calls this directly
no test coverage detected