From a28fdac2422af897df8c2d92f69ba6c71a28f180 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Mon, 26 Feb 2018 09:43:08 -0800 Subject: [PATCH] fix pending cert db changes --- lemur/migrations/versions/556ceb3e3c3e_.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lemur/migrations/versions/556ceb3e3c3e_.py b/lemur/migrations/versions/556ceb3e3c3e_.py index 7b9045c2..2916c0eb 100644 --- a/lemur/migrations/versions/556ceb3e3c3e_.py +++ b/lemur/migrations/versions/556ceb3e3c3e_.py @@ -8,11 +8,13 @@ Create Date: 2018-01-05 01:18:45.571595 # revision identifiers, used by Alembic. revision = '556ceb3e3c3e' -down_revision = '47baffaae1a7' +down_revision = '449c3d5c7299' from alembic import op import sqlalchemy as sa +from lemur.utils import Vault from sqlalchemy.dialects import postgresql +from sqlalchemy_utils import ArrowType def upgrade(): # ### commands auto generated by Alembic - please adjust! ### @@ -28,8 +30,8 @@ def upgrade(): sa.Column('cn', sa.String(length=128), nullable=True), sa.Column('csr', sa.Text(), nullable=False), sa.Column('chain', sa.Text(), nullable=True), - sa.Column('private_key', lemur.utils.Vault(), nullable=True), - sa.Column('date_created', sqlalchemy_utils.types.arrow.ArrowType(), server_default=sa.text('now()'), nullable=False), + sa.Column('private_key', Vault(), nullable=True), + sa.Column('date_created', ArrowType(), server_default=sa.text('now()'), nullable=False), sa.Column('status', sa.String(length=128), nullable=True), sa.Column('rotation', sa.Boolean(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), @@ -78,12 +80,6 @@ def upgrade(): sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ondelete='cascade') ) op.create_index('pending_cert_source_associations_ix', 'pending_cert_source_associations', ['source_id', 'pending_cert_id'], unique=False) - op.create_table('roles_authorities', - sa.Column('authority_id', sa.Integer(), nullable=True), - sa.Column('role_id', sa.Integer(), nullable=True), - sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ), - sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ) - ) # ### end Alembic commands ###