add secuence and remove schema for placeholder_log
This commit is contained in:
parent
2e3bc8137f
commit
4507a3206c
|
@ -56,9 +56,10 @@ def upgrade():
|
||||||
['common.user.id'],
|
['common.user.id'],
|
||||||
),
|
),
|
||||||
sa.PrimaryKeyConstraint('id'),
|
sa.PrimaryKeyConstraint('id'),
|
||||||
schema=f'{get_inv()}',
|
|
||||||
)
|
)
|
||||||
|
op.execute("CREATE SEQUENCE placeholders_log_seq START 1;")
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_table('placeholders_log')
|
op.drop_table('placeholders_log')
|
||||||
|
op.execute("DROP SEQUENCE placeholders_log_seq;")
|
||||||
|
|
|
@ -50,7 +50,9 @@ def upgrade():
|
||||||
sa.PrimaryKeyConstraint('id'),
|
sa.PrimaryKeyConstraint('id'),
|
||||||
schema=f'{get_inv()}',
|
schema=f'{get_inv()}',
|
||||||
)
|
)
|
||||||
|
op.execute("CREATE SEQUENCE placeholder_seq START 1;")
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_table('placeholder', schema=f'{get_inv()}')
|
op.drop_table('placeholder', schema=f'{get_inv()}')
|
||||||
|
op.execute("DROP SEQUENCE placeholder_log_seq;")
|
||||||
|
|
|
@ -49,7 +49,8 @@ class SnapshotsLog(Thing):
|
||||||
class PlaceholdersLog(Thing):
|
class PlaceholdersLog(Thing):
|
||||||
"""A Placeholder log."""
|
"""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)
|
source = Column(CIText(), default='', nullable=True)
|
||||||
type = Column(CIText(), default='', nullable=True)
|
type = Column(CIText(), default='', nullable=True)
|
||||||
severity = Column(SmallInteger, default=Severity.Info, nullable=False)
|
severity = Column(SmallInteger, default=Severity.Info, nullable=False)
|
||||||
|
|
Reference in New Issue