onion: add keys and certs to database
This commit is contained in:
parent
f603cb9101
commit
d5824aa518
4 changed files with 107 additions and 6 deletions
|
@ -0,0 +1,38 @@
|
|||
"""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 ###
|
Loading…
Add table
Add a link
Reference in a new issue