38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
"""adds keys and certs to onions
|
|
|
|
Revision ID: c4ce00f86823
|
|
Revises: 45fedef32318
|
|
Create Date: 2022-11-09 11:07:49.780172
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'c4ce00f86823'
|
|
down_revision = '45fedef32318'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('onion', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('onion_public_key', sa.LargeBinary()))
|
|
batch_op.add_column(sa.Column('onion_private_key', sa.LargeBinary()))
|
|
batch_op.add_column(sa.Column('tls_public_key', sa.LargeBinary()))
|
|
batch_op.add_column(sa.Column('tls_private_key', sa.LargeBinary()))
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('onion', schema=None) as batch_op:
|
|
batch_op.drop_column('tls_private_key')
|
|
batch_op.drop_column('tls_public_key')
|
|
batch_op.drop_column('onion_private_key')
|
|
batch_op.drop_column('onion_public_key')
|
|
|
|
# ### end Alembic commands ###
|