Skip to content

Commit

Permalink
fix alembic
Browse files Browse the repository at this point in the history
  • Loading branch information
ikhit committed Oct 16, 2024
1 parent 638b829 commit 1209e69
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 51 deletions.
4 changes: 2 additions & 2 deletions app/alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
keys = root,sqlalchemy,alembic

[handlers]
keys = generic
keys = console

[formatters]
keys = generic
Expand Down Expand Up @@ -111,4 +111,4 @@ formatter = generic

[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
datefmt = %H:%M:%S
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""first commit
Revision ID: e8b13ba333a5
Revision ID: 17c3c5e67c14
Revises:
Create Date: 2024-10-15 13:59:59.402203
Create Date: 2024-10-16 11:27:25.240035
"""
from typing import Sequence, Union
Expand All @@ -12,7 +12,7 @@
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision: str = 'e8b13ba333a5'
revision: str = '17c3c5e67c14'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand Down Expand Up @@ -63,6 +63,7 @@ def upgrade() -> None:
sa.Column('description', sa.TEXT(), nullable=True),
sa.Column('id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['product_id'], ['productcategory.id'], ondelete='CASCADE'),
sa.ForeignKeyConstraint(['product_id'], ['productcategory.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_categorytype_product_id'), 'categorytype', ['product_id'], unique=False)
Expand Down
41 changes: 0 additions & 41 deletions app/alembic/versions/fd795bdbba90_update_feedback.py

This file was deleted.

2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from bot.callbacks import router as callback_router
from bot.fsm_contexts.manager_context import router as fsm_context_router
from bot.fsm_contexts.feedback_context import router as feedback_context
from core.init_db import add_portfolio
from core.init_db import add_portfolio, set_admin
from admin.handlers.admin_handlers import admin_router
from admin.handlers.user import user_router
from loggers.log import setup_logging
Expand Down
5 changes: 1 addition & 4 deletions app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ class RoleEnum(str, Enum):
class QuestionEnum(str, Enum):
GENERAL_QUESTIONS = "Общие вопросы"
PROBLEMS_WITH_PRODUCTS = "Проблемы с продуктами"
GENERAL_QUESTIONS = "Общие вопросы"
PROBLEMS_WITH_PRODUCTS = "Проблемы с продуктами"



class User(Base):
"""БД модель пользователя."""

Expand Down

0 comments on commit 1209e69

Please sign in to comment.