fix: another reinitialization
This commit is contained in:
parent
6f705adf9e
commit
06c656d92c
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -12,8 +12,8 @@ jobs:
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
path: "."
|
||||
filename: 'server.zip'
|
||||
exclusions: '*.git*'
|
||||
- name: Release Archive
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
|
||||
@ -55,7 +55,7 @@ class Item(db.Model):
|
||||
class Bought(db.Model):
|
||||
user = db.Column(db.ForeignKey('user.id'), primary_key=True)
|
||||
item = db.Column(db.ForeignKey('item.id'), primary_key=True)
|
||||
date = db.Column(db.Date)
|
||||
date = db.Column(db.Date, primary_key=True)
|
||||
amount = db.Column(db.SmallInteger)
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
"""full structure
|
||||
|
||||
Revision ID: 655a8c77d6b7
|
||||
Revision ID: 60e8f49dee49
|
||||
Revises:
|
||||
Create Date: 2022-02-03 18:25:44.422693
|
||||
Create Date: 2022-02-03 19:24:24.715589
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
@ -10,7 +10,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '655a8c77d6b7'
|
||||
revision = '60e8f49dee49'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
@ -52,11 +52,11 @@ def upgrade():
|
||||
op.create_table('bought',
|
||||
sa.Column('user', sa.String(length=10), nullable=False),
|
||||
sa.Column('item', sa.BigInteger(), nullable=False),
|
||||
sa.Column('date', sa.Date(), nullable=True),
|
||||
sa.Column('date', sa.Date(), nullable=False),
|
||||
sa.Column('amount', sa.SmallInteger(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['item'], ['item.id'], ),
|
||||
sa.ForeignKeyConstraint(['user'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('user', 'item')
|
||||
sa.PrimaryKeyConstraint('user', 'item', 'date')
|
||||
)
|
||||
op.create_table('item_category',
|
||||
sa.Column('item', sa.BigInteger(), nullable=False),
|
||||
Loading…
x
Reference in New Issue
Block a user