Skip to content

Conversation

@zipperman1
Copy link
Contributor

Изменения

2 таблицы для поставки

Детали реализации

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

@zipperman1 zipperman1 self-assigned this Apr 19, 2025
@github-actions
Copy link

Summary

Tests Skipped Failures Errors Time
1 0 💤 0 ❌ 0 🔥 12.361s ⏱️

@Temmmmmo Temmmmmo requested a review from Copilot May 27, 2025 20:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two new incremental tables to the STG/marketing layer and updates migration scripts accordingly.

  • Introduce UserIncremental and ActionsInfoIncremental models in marketing.py
  • Add a new Alembic migration (incremental_dag) to create and drop these tables
  • Clean up import ordering in several existing migration files

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
profcomff_definitions/STG/marketing.py Added UserIncremental and ActionsInfoIncremental models
migrations/versions/20250419_1938_e8f40f2847f7_incremental_dag.py New migration to create/drop incremental tables
migrations/versions/20250416_0827_d43d62fb3748_fix_chat.py Reordered imports
migrations/versions/20250415_2154_40d72f2dd950_fix_viribus_ods.py Reordered imports
migrations/versions/20250415_2140_2685b42bfef5_add_ods_telegram_viribus.py Reordered imports
migrations/versions/20250412_1504_066fd36bb01c_added_column_to_fetch_with_back_data.py Reordered imports
migrations/versions/20250412_0002_f8908a4837a5_dm_marketing.py Reordered imports
migrations/versions/20250315_1949_5edf7206774e_fix_redirector.py Reordered imports
Comments suppressed due to low confidence (1)

migrations/versions/20250419_1938_e8f40f2847f7_incremental_dag.py:20

  • No tests verify creation or correct schema of the new incremental tables. Consider adding integration or unit tests to cover these migrations.
def upgrade():

create_ts: Mapped[datetime | None]


class UserIncremental(Base):
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a docstring to the UserIncremental model to explain its purpose and fields, improving code readability.

Suggested change
class UserIncremental(Base):
class UserIncremental(Base):
"""
Represents incremental updates to user data.
Fields:
id (int): Primary key for the record.
union_number (str | None): A unique identifier for the user within a union, if applicable.
user_agent (str | None): The user agent string associated with the user.
auth_user_id (int | None): The ID of the authenticated user, if available.
modify_ts (datetime | None): The timestamp of the last modification to the record.
create_ts (datetime | None): The timestamp when the record was created.
"""

Copilot uses AI. Check for mistakes.
from alembic import op
import sqlalchemy as sa
import os

Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Import statements have been reordered and blank lines inserted inconsistently across migration scripts; standardize import grouping and formatting for consistency.

Suggested change

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants