Skip to content

Commit e0f953e

Browse files
committed
Merge branch 'develop' into staging
2 parents 4f4b782 + b7a11fc commit e0f953e

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

.claude/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(grep -rln *)",
5+
"Bash(grep -nA12 '\\\\[project.optional-dependencies\\\\]\\\\|optional-dependencies\\\\|\\\\[dependency-groups\\\\]' pyproject.toml)",
6+
"Bash(grep -vE \"^$\")",
7+
"Bash(git ls-tree *)",
8+
"Bash(grep -E '\\\\.py$')",
9+
"Bash(grep -v '\\\\.sample$')",
10+
"Bash(git config *)",
11+
"Bash(command -v gh)",
12+
"Bash(gh api *)",
13+
"Bash(python3 -c \"import sys,json; d=json.load\\(sys.stdin\\); print\\('protected:', d.get\\('protected'\\)\\); p=d.get\\('protection',{}\\); print\\('required_pull_request_reviews:', 'yes' if p.get\\('required_pull_request_reviews'\\) else 'no'\\); print\\('enforce_admins:', \\(p.get\\('enforce_admins'\\) or {}\\).get\\('enabled'\\)\\)\")"
14+
]
15+
}
16+
}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ authorization and authentication based on a TDEI/Keycloak JWT token (see main.py
88

99
## Branch Index
1010

11-
* ```develop``` do your work here
12-
* ```development``` keep this up to date with the "development" environment / dev tag
11+
* ```develop``` merge your work here; keep this up to date with the "development" environment / dev tag
1312
* ```staging``` keep this up to date with the "staging" environment / stage tag
1413
* ```production``` keep this up to date with the "production" environment / prod tag
1514

alembic_task/versions/b3f8a2c91e04_add_auto_flag_review.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,28 @@
1010

1111
import sqlalchemy as sa
1212
from alembic import op
13+
from sqlalchemy import inspect
1314

1415
revision: str = "b3f8a2c91e04"
1516
down_revision: Union[str, None] = "add6266277c7"
1617
branch_labels: Union[str, Sequence[str], None] = None
1718
depends_on: Union[str, Sequence[str], None] = None
1819

1920

21+
def _has_column(name: str) -> bool:
22+
"""True if `workspaces.<name>` already exists.
23+
24+
Guards the add/drop so the migration is safe whether or not the column
25+
was created out-of-band (e.g. by a parallel branch) — a plain
26+
``ADD COLUMN`` would raise ``DuplicateColumnError`` otherwise.
27+
"""
28+
insp = inspect(op.get_bind())
29+
return name in {c["name"] for c in insp.get_columns("workspaces")}
30+
31+
2032
def upgrade() -> None:
33+
if _has_column("autoFlagReview"):
34+
return
2135
with op.batch_alter_table("workspaces", schema=None) as batch_op:
2236
batch_op.add_column(
2337
sa.Column(
@@ -30,5 +44,7 @@ def upgrade() -> None:
3044

3145

3246
def downgrade() -> None:
47+
if not _has_column("autoFlagReview"):
48+
return
3349
with op.batch_alter_table("workspaces", schema=None) as batch_op:
3450
batch_op.drop_column("autoFlagReview")

0 commit comments

Comments
 (0)