simplier report storing

This commit is contained in:
Aaron Kimbre
2022-01-16 18:49:28 -06:00
parent 4a3fe08fe7
commit 1a5531eb19
3 changed files with 29 additions and 35 deletions

View File

@@ -1,16 +1,16 @@
"""itemreport table
"""items-reports
Revision ID: b89c21b5112f
Revision ID: 3da561e7f7c0
Revises: 8a2966b9f7ee
Create Date: 2022-01-15 19:21:44.544653
Create Date: 2022-01-16 18:27:11.067205
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'b89c21b5112f'
revision = '3da561e7f7c0'
down_revision = '8a2966b9f7ee'
branch_labels = None
depends_on = None
@@ -19,10 +19,9 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('item_reports',
sa.Column('item', sa.Integer(), nullable=False),
sa.Column('count', sa.Integer(), nullable=False),
sa.Column('date', sa.Date(), nullable=False),
sa.PrimaryKeyConstraint('item', 'date')
sa.Column('data', sa.JSON(), nullable=False),
sa.Column('date', sa.Date(), autoincrement=False, nullable=False),
sa.PrimaryKeyConstraint('date')
)
# ### end Alembic commands ###