Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Change Link table nomenclature

Revision ID: c14d669d7c0d
Revises: 5930e70660c5
Create Date: 2025-08-11 09:14:08.034093

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

Check warning on line 11 in alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py#L11 <401>

'sqlalchemy as sa' imported but unused
Raw output
./alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py:11:1: F401 'sqlalchemy as sa' imported but unused


# revision identifiers, used by Alembic.
revision: str = 'c14d669d7c0d'
down_revision: Union[str, None] = '5930e70660c5'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

OLD_URL_DATA_SOURCE_NAME = "url_data_sources"
NEW_URL_DATA_SOURCE_NAME = "url_data_source"

def upgrade() -> None:

Check warning on line 23 in alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py#L23 <103>

Missing docstring in public function
Raw output
./alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py:23:1: D103 Missing docstring in public function
op.rename_table(OLD_URL_DATA_SOURCE_NAME, NEW_URL_DATA_SOURCE_NAME)


def downgrade() -> None:

Check warning on line 27 in alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py#L27 <103>

Missing docstring in public function
Raw output
./alembic/versions/2025_08_11_0914-c14d669d7c0d_change_link_table_nomenclature.py:27:1: D103 Missing docstring in public function
op.rename_table(NEW_URL_DATA_SOURCE_NAME, OLD_URL_DATA_SOURCE_NAME)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class URLDataSource(CreatedAtMixin, URLDependentMixin, WithIDBase):
__tablename__ = "url_data_sources"
__tablename__ = "url_data_source"

data_source_id = Column(Integer, nullable=False)

Expand Down