sqla (mapping): fix missing PEP constraint:
A constraint name was missing on the `PubsubNode.pep` column, resulting in a crash when trying to generate the initial database on launch with an empty `local_dir`. Migration script introducing the column (f4cb5fc600c7_add_missing_pep_check_constraint.py) has been updated too. Another migration script has been made to add the constraint to existing DB (only if they are missing).
This commit is contained in:
parent
de13f16791
commit
7107d64a5b
1 changed files with 42 additions and 2 deletions
|
|
@ -629,7 +629,7 @@ class PubsubNode(Base):
|
|||
service = Column(JID)
|
||||
name = Column(Text, nullable=False)
|
||||
pep = Column(
|
||||
Boolean(create_constraint=True),
|
||||
Boolean(create_constraint=True, name="pep_bool"),
|
||||
nullable=False,
|
||||
server_default=false(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue