diff --git a/ereuse_devicehub/migrations/versions/3e3a67f62972_placeholder_log.py b/ereuse_devicehub/migrations/versions/3e3a67f62972_placeholder_log.py index aee0d162..b3850218 100644 --- a/ereuse_devicehub/migrations/versions/3e3a67f62972_placeholder_log.py +++ b/ereuse_devicehub/migrations/versions/3e3a67f62972_placeholder_log.py @@ -56,9 +56,10 @@ def upgrade(): ['common.user.id'], ), sa.PrimaryKeyConstraint('id'), - schema=f'{get_inv()}', ) + op.execute("CREATE SEQUENCE placeholders_log_seq START 1;") def downgrade(): op.drop_table('placeholders_log') + op.execute("DROP SEQUENCE placeholders_log_seq;") diff --git a/ereuse_devicehub/migrations/versions/aeca9fb50cc6_add_placeholder.py b/ereuse_devicehub/migrations/versions/aeca9fb50cc6_add_placeholder.py index d013b64e..878cb6ec 100644 --- a/ereuse_devicehub/migrations/versions/aeca9fb50cc6_add_placeholder.py +++ b/ereuse_devicehub/migrations/versions/aeca9fb50cc6_add_placeholder.py @@ -50,7 +50,9 @@ def upgrade(): sa.PrimaryKeyConstraint('id'), schema=f'{get_inv()}', ) + op.execute("CREATE SEQUENCE placeholder_seq START 1;") def downgrade(): op.drop_table('placeholder', schema=f'{get_inv()}') + op.execute("DROP SEQUENCE placeholder_log_seq;") diff --git a/ereuse_devicehub/parser/models.py b/ereuse_devicehub/parser/models.py index 61d4839d..d8b4b62b 100644 --- a/ereuse_devicehub/parser/models.py +++ b/ereuse_devicehub/parser/models.py @@ -49,7 +49,8 @@ class SnapshotsLog(Thing): class PlaceholdersLog(Thing): """A Placeholder log.""" - id = Column(BigInteger, Sequence('snapshots_log_seq'), primary_key=True) + __table_args__ = {'schema': ''} + id = Column(BigInteger, Sequence('placeholders_log_seq'), primary_key=True) source = Column(CIText(), default='', nullable=True) type = Column(CIText(), default='', nullable=True) severity = Column(SmallInteger, default=Severity.Info, nullable=False)