remove schema of placeholder

This commit is contained in:
Cayo Puigdefabregas 2022-07-07 16:32:00 +02:00
parent 3af2645706
commit 1eed2f5773
2 changed files with 4 additions and 2 deletions

View File

@ -48,9 +48,10 @@ def upgrade():
sa.Column('device_id', sa.BigInteger(), nullable=False),
sa.ForeignKeyConstraint(['device_id'], [f'{get_inv()}.device.id']),
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.drop_table('placeholder')
op.execute("DROP SEQUENCE placeholder_seq;")

View File

@ -827,6 +827,7 @@ class DisplayMixin:
class Placeholder(Thing):
__table_args__ = {'schema': ''}
id = Column(BigInteger, Sequence('placeholder_seq'), primary_key=True)
pallet = Column(Unicode(), nullable=True)
phid = Column(Unicode(), nullable=False, default=create_phid)