Skip to content

Commit

Permalink
fix rating stg schema (#124)
Browse files Browse the repository at this point in the history
## Изменения
<!-- Опишите здесь на языке, понятном каждому, изменения, сделанные в
исходном коде по пунктам. -->

## Детали реализации
<!-- Здесь можно описать технические детали по пунктам. -->

## Check-List
<!-- После сохранения у следующих полей появятся галочки, которые нужно
проставить мышкой -->
- [ ] Вы проверили свой код перед отправкой запроса?
- [ ] Вы написали тесты к реализованным функциям?
- [ ] Вы не забыли применить форматирование `black` и `isort` для
_Back-End_ или `Prettier` для _Front-End_?

Co-authored-by: Захаров Иван Михайлович <[email protected]>
  • Loading branch information
Zimovchik and Захаров Иван Михайлович authored Feb 15, 2025
1 parent cbdc32c commit 06b8c59
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions migrations/versions/20250215_1146_adb819726799_fix_stg_rating.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""fix stg rating
Revision ID: adb819726799
Revises: cfbe67fec54d
Create Date: 2025-02-15 11:46:07.544400
"""

import os

import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = 'adb819726799'
down_revision = 'cfbe67fec54d'
branch_labels = None
depends_on = None


def upgrade():
op.alter_column('comment', 'subject', existing_type=sa.VARCHAR(), nullable=True, schema='STG_RATING')


def downgrade():
op.alter_column('comment', 'subject', existing_type=sa.VARCHAR(), nullable=False, schema='STG_RATING')
2 changes: 1 addition & 1 deletion profcomff_definitions/STG/rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Comment(Base):
uuid: Mapped[UUID] = mapped_column(primary_key=True)
create_ts: Mapped[datetime]
update_ts: Mapped[datetime]
subject: Mapped[str]
subject: Mapped[str | None]
text: Mapped[str | None]
mark_kindness: Mapped[int]
mark_freebie: Mapped[int]
Expand Down

0 comments on commit 06b8c59

Please sign in to comment.