This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new c2479c8  Add a schema mirgation for the new workflow fields
c2479c8 is described below

commit c2479c8193d91aaa3e829615cfd8e95ff8c1ce88
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Sep 4 19:24:53 2025 +0100

    Add a schema mirgation for the new workflow fields
---
 migrations/versions/0026_2025.09.04_eb02c4d9.py | 35 +++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/migrations/versions/0026_2025.09.04_eb02c4d9.py 
b/migrations/versions/0026_2025.09.04_eb02c4d9.py
new file mode 100644
index 0000000..54e3c81
--- /dev/null
+++ b/migrations/versions/0026_2025.09.04_eb02c4d9.py
@@ -0,0 +1,35 @@
+"""Add workflow release policy fields
+
+Revision ID: 0026_2025.09.04_eb02c4d9
+Revises: 0025_2025.08.21_57ca4488
+Create Date: 2025-09-04 18:23:41.821738+00:00
+"""
+
+from collections.abc import Sequence
+
+import sqlalchemy as sa
+from alembic import op
+
+# Revision identifiers, used by Alembic
+revision: str = "0026_2025.09.04_eb02c4d9"
+down_revision: str | None = "0025_2025.08.21_57ca4488"
+branch_labels: str | Sequence[str] | None = None
+depends_on: str | Sequence[str] | None = None
+
+
+def upgrade() -> None:
+    with op.batch_alter_table("releasepolicy", schema=None) as batch_op:
+        batch_op.add_column(sa.Column("github_compose_workflow_path", 
sa.String(), nullable=False))
+        batch_op.add_column(sa.Column("github_vote_workflow_path", 
sa.String(), nullable=False))
+        batch_op.add_column(sa.Column("github_finish_workflow_path", 
sa.String(), nullable=False))
+        batch_op.drop_column("github_workflow_path")
+
+
+def downgrade() -> None:
+    with op.batch_alter_table("releasepolicy", schema=None) as batch_op:
+        batch_op.add_column(
+            sa.Column("github_workflow_path", sa.VARCHAR(), 
server_default=sa.text("('')"), nullable=False)
+        )
+        batch_op.drop_column("github_finish_workflow_path")
+        batch_op.drop_column("github_vote_workflow_path")
+        batch_op.drop_column("github_compose_workflow_path")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to