Таблицы для поставки#143
Open
zipperman1 wants to merge 3 commits into
Open
Conversation
Summary
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds two new incremental tables to the STG/marketing layer and updates migration scripts accordingly.
- Introduce
UserIncrementalandActionsInfoIncrementalmodels inmarketing.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): |
There was a problem hiding this comment.
[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. | |
| """ |
| from alembic import op | ||
| import sqlalchemy as sa | ||
| import os | ||
|
|
There was a problem hiding this comment.
[nitpick] Import statements have been reordered and blank lines inserted inconsistently across migration scripts; standardize import grouping and formatting for consistency.
Suggested change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Изменения
2 таблицы для поставки
Детали реализации
Check-List
blackиisortдля Back-End илиPrettierдля Front-End?