diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index da99708..d431073 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -67,7 +67,7 @@ jobs: - uses: isort/isort-action@master with: requirementsFiles: "requirements.txt requirements.dev.txt" - - uses: psf/black@stable + - uses: psf/black@23.11.0 - name: Comment if linting failed if: failure() id: comment diff --git a/migrations/env.py b/migrations/env.py index b21c173..6f0ad12 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -111,7 +111,7 @@ def run_migrations_online(): """ configuration = config.get_section(config.config_ini_section) - configuration["sqlalchemy.url"] = os.getenv("DB_DSN", "postgresql://postgres:12345@postgres:5432/postgres") + configuration["sqlalchemy.url"] = os.getenv("DB_DSN", "postgresql://postgres:12345@postgres::5432/postgres") connectable = engine_from_config( configuration, prefix="sqlalchemy.", diff --git a/migrations/versions/20260203_1853_1a5ed9901423_user_view_type_fix.py b/migrations/versions/20260203_1853_1a5ed9901423_user_view_type_fix.py new file mode 100644 index 0000000..f0ec92d --- /dev/null +++ b/migrations/versions/20260203_1853_1a5ed9901423_user_view_type_fix.py @@ -0,0 +1,39 @@ +"""user_view_type_fix + +Revision ID: 1a5ed9901423 +Revises: ac67f7273994 +Create Date: 2026-02-03 18:53:36.874014 + +""" + +import os + +import sqlalchemy as sa +from alembic import op + + +# revision identifiers, used by Alembic. +revision = '1a5ed9901423' +down_revision = 'ac67f7273994' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('profcomff_team', sa.Column('type', sa.String(), nullable=True), schema='STG_GITHUB') + op.add_column('profcomff_team', sa.Column('organization_id', sa.Integer(), nullable=True), schema='STG_GITHUB') + op.add_column('profcomff_team_member', sa.Column('user_view_type', sa.String(), nullable=True), schema='STG_GITHUB') + op.add_column( + 'profcomff_team_repo', sa.Column('owner_user_view_type', sa.String(), nullable=True), schema='STG_GITHUB' + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('profcomff_team_repo', 'owner_user_view_type', schema='STG_GITHUB') + op.drop_column('profcomff_team_member', 'user_view_type', schema='STG_GITHUB') + op.drop_column('profcomff_team', 'organization_id', schema='STG_GITHUB') + op.drop_column('profcomff_team', 'type', schema='STG_GITHUB') + # ### end Alembic commands ### diff --git a/profcomff_definitions/STG/github.py b/profcomff_definitions/STG/github.py index dc0b05e..b90554b 100644 --- a/profcomff_definitions/STG/github.py +++ b/profcomff_definitions/STG/github.py @@ -249,6 +249,8 @@ class ProfcomffTeam(Base): repositories_url: Mapped[str | None] permission: Mapped[str | None] parent: Mapped[str | None] + type: Mapped[str | None] + organization_id: Mapped[int | None] class ProfcomffTeamMember(Base): @@ -271,6 +273,7 @@ class ProfcomffTeamMember(Base): received_events_url: Mapped[str | None] type: Mapped[str | None] site_admin: Mapped[bool | None] + user_view_type: Mapped[str | None] class ProfcomffTeamRepo(Base): @@ -379,6 +382,7 @@ class ProfcomffTeamRepo(Base): permissions_pull: Mapped[str | None] role_name: Mapped[str | None] license: Mapped[str | None] + owner_user_view_type: Mapped[str | None] class ProfcomffCommit(Base): diff --git a/requirements.dev.txt b/requirements.dev.txt index faa951f..6976fa6 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,6 +1,6 @@ definitions_lib autoflake -black +black==23.11.0 setuptools flake8 httpx