Chore: Moved individual models into their own files.

Chore: Updated dependencies.
This commit is contained in:
2021-03-17 09:39:56 +05:30
parent 716c74c974
commit ea2bfb1c0c
89 changed files with 1306 additions and 1068 deletions

View File

@ -2,6 +2,7 @@ import logging
from alembic import context
from barker.core.config import settings
from barker.models.user import User
from sqlalchemy import create_engine, pool
@ -12,8 +13,6 @@ logging.getLogger("alembic").setLevel(settings.ALEMBIC_LOG_LEVEL)
# Interpret the config file for Python logging.
# This line sets up loggers basically.
from barker.models.auth import User # noqa
target_metadata = User.metadata

View File

@ -8,8 +8,12 @@ Create Date: 2020-06-04 08:14:34.132248
import sqlalchemy as sa
from alembic import op
from barker.models.auth import Permission, User # noqa
from barker.models.master import Customer, DbSetting, ModifierCategory, Section
from barker.models.customer import Customer
from barker.models.db_setting import DbSetting
from barker.models.modifier_category import ModifierCategory
from barker.models.permission import Permission
from barker.models.section import Section
from barker.models.user import User # noqa: F401
from sqlalchemy import column, table
from sqlalchemy.dialects import postgresql
@ -129,7 +133,6 @@ def upgrade():
sa.Column("address", sa.Unicode(length=255), nullable=False),
sa.Column("cut_code", sa.Unicode(length=255), nullable=False),
sa.PrimaryKeyConstraint("id", name=op.f("pk_printers")),
sa.UniqueConstraint("address", name=op.f("uq_printers_address")),
sa.UniqueConstraint("name", name=op.f("uq_printers_name")),
)
op.create_table(