Merge pull request #1068 from Netflix/pending_fix

fix pending cert db changes
This commit is contained in:
Curtis 2018-02-26 09:52:07 -08:00 committed by GitHub
commit c9cb5800ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 9 deletions

View File

@ -8,11 +8,13 @@ Create Date: 2018-01-05 01:18:45.571595
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = '556ceb3e3c3e' revision = '556ceb3e3c3e'
down_revision = '47baffaae1a7' down_revision = '449c3d5c7299'
from alembic import op from alembic import op
import sqlalchemy as sa import sqlalchemy as sa
from lemur.utils import Vault
from sqlalchemy.dialects import postgresql from sqlalchemy.dialects import postgresql
from sqlalchemy_utils import ArrowType
def upgrade(): def upgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
@ -28,8 +30,8 @@ def upgrade():
sa.Column('cn', sa.String(length=128), nullable=True), sa.Column('cn', sa.String(length=128), nullable=True),
sa.Column('csr', sa.Text(), nullable=False), sa.Column('csr', sa.Text(), nullable=False),
sa.Column('chain', sa.Text(), nullable=True), sa.Column('chain', sa.Text(), nullable=True),
sa.Column('private_key', lemur.utils.Vault(), nullable=True), sa.Column('private_key', Vault(), nullable=True),
sa.Column('date_created', sqlalchemy_utils.types.arrow.ArrowType(), server_default=sa.text('now()'), nullable=False), sa.Column('date_created', ArrowType(), server_default=sa.text('now()'), nullable=False),
sa.Column('status', sa.String(length=128), nullable=True), sa.Column('status', sa.String(length=128), nullable=True),
sa.Column('rotation', sa.Boolean(), nullable=True), sa.Column('rotation', sa.Boolean(), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True),
@ -78,12 +80,6 @@ def upgrade():
sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ondelete='cascade') 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_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 ### # ### end Alembic commands ###