refactor(pipelines): address code review - shared get_current_user_id, aria-live, deduplicate user ID logic
- Extract _get_user_id into shared auth.get_current_user_id() used by both pipelines API and the assign-pipeline endpoint in files API - Fix aria-live attribute: use two separate static containers (polite/assertive) instead of dynamic Alpine.js binding for correct screen reader announcements - Fix migration comment to accurately describe batch-mode FK creation - Remove redundant tags parameter from reorder endpoint decorator - Rename _make_file test helper to _make_test_file_record for clarity - Update docs/UserGuide.md and docs/API.md with full Pipelines reference Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -44,9 +44,8 @@ def upgrade() -> None:
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
|
||||
)
|
||||
|
||||
# Use batch mode for SQLite compatibility when altering the files table.
|
||||
# SQLite does not support adding FK constraints inline via ALTER TABLE, so we
|
||||
# add the plain integer column and define the FK reference at the model level.
|
||||
# Use batch mode (copy-and-move strategy) for SQLite compatibility.
|
||||
# A named FK constraint is created so Alembic can reference it in the downgrade.
|
||||
with op.batch_alter_table("files") as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column("pipeline_id", sa.Integer(), nullable=True),
|
||||
|
||||
Reference in New Issue
Block a user