30 lines
827 B
Python
30 lines
827 B
Python
"""bind repositories to manifest signing public keys
|
|
|
|
Revision ID: 0004_repository_signing_keys
|
|
Revises: 0003_execution_events
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
revision = "0004_repository_signing_keys"
|
|
down_revision = "0003_execution_events"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("repositories") as batch:
|
|
batch.add_column(
|
|
sa.Column("signing_key_id", sa.String(length=64), nullable=False, server_default="")
|
|
)
|
|
batch.add_column(
|
|
sa.Column("signing_public_key", sa.String(length=64), nullable=False, server_default="")
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("repositories") as batch:
|
|
batch.drop_column("signing_public_key")
|
|
batch.drop_column("signing_key_id")
|