Add in columns and fix migration
This commit is contained in:
parent
04fea25394
commit
15e75faa39
@ -1,50 +0,0 @@
|
||||
"""Record signer DOD ID
|
||||
|
||||
Revision ID: 4f2d7a5076f2
|
||||
Revises: 1f690989e38e
|
||||
Create Date: 2019-02-07 15:48:11.855697
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4f2d7a5076f2'
|
||||
down_revision = '1f690989e38e'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f('ix_audit_events_portfolio_id'), 'audit_events', ['portfolio_id'], unique=False)
|
||||
op.drop_index('ix_audit_events_workspace_id', table_name='audit_events')
|
||||
op.create_index(op.f('ix_invitations_portfolio_role_id'), 'invitations', ['portfolio_role_id'], unique=False)
|
||||
op.drop_index('ix_invitations_workspace_role_id', table_name='invitations')
|
||||
op.create_index(op.f('ix_portfolio_roles_portfolio_id'), 'portfolio_roles', ['portfolio_id'], unique=False)
|
||||
op.create_index(op.f('ix_portfolio_roles_user_id'), 'portfolio_roles', ['user_id'], unique=False)
|
||||
op.create_index('portfolio_role_user_portfolio', 'portfolio_roles', ['user_id', 'portfolio_id'], unique=True)
|
||||
op.drop_index('ix_workspace_roles_user_id', table_name='portfolio_roles')
|
||||
op.drop_index('ix_workspace_roles_workspace_id', table_name='portfolio_roles')
|
||||
op.drop_index('workspace_role_user_workspace', table_name='portfolio_roles')
|
||||
op.add_column('task_orders', sa.Column('signed_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('task_orders', sa.Column('signer_dod_id', sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('task_orders', 'signer_dod_id')
|
||||
op.drop_column('task_orders', 'signed_at')
|
||||
op.create_index('workspace_role_user_workspace', 'portfolio_roles', ['user_id', 'portfolio_id'], unique=True)
|
||||
op.create_index('ix_workspace_roles_workspace_id', 'portfolio_roles', ['portfolio_id'], unique=False)
|
||||
op.create_index('ix_workspace_roles_user_id', 'portfolio_roles', ['user_id'], unique=False)
|
||||
op.drop_index('portfolio_role_user_portfolio', table_name='portfolio_roles')
|
||||
op.drop_index(op.f('ix_portfolio_roles_user_id'), table_name='portfolio_roles')
|
||||
op.drop_index(op.f('ix_portfolio_roles_portfolio_id'), table_name='portfolio_roles')
|
||||
op.create_index('ix_invitations_workspace_role_id', 'invitations', ['portfolio_role_id'], unique=False)
|
||||
op.drop_index(op.f('ix_invitations_portfolio_role_id'), table_name='invitations')
|
||||
op.create_index('ix_audit_events_workspace_id', 'audit_events', ['portfolio_id'], unique=False)
|
||||
op.drop_index(op.f('ix_audit_events_portfolio_id'), table_name='audit_events')
|
||||
# ### end Alembic commands ###
|
34
alembic/versions/de5276fad9ef_record_signer_dod_id.py
Normal file
34
alembic/versions/de5276fad9ef_record_signer_dod_id.py
Normal file
@ -0,0 +1,34 @@
|
||||
"""Record signer DOD ID
|
||||
|
||||
Revision ID: de5276fad9ef
|
||||
Revises: 1f690989e38e
|
||||
Create Date: 2019-02-11 10:51:51.419346
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'de5276fad9ef'
|
||||
down_revision = '1f690989e38e'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('task_orders', sa.Column('level_of_warrant', sa.Numeric(scale=2), nullable=True))
|
||||
op.add_column('task_orders', sa.Column('signed_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('task_orders', sa.Column('signer_dod_id', sa.String(), nullable=True))
|
||||
op.add_column('task_orders', sa.Column('unlimited_level_of_warrant', sa.Boolean(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('task_orders', 'unlimited_level_of_warrant')
|
||||
op.drop_column('task_orders', 'signer_dod_id')
|
||||
op.drop_column('task_orders', 'signed_at')
|
||||
op.drop_column('task_orders', 'level_of_warrant')
|
||||
# ### end Alembic commands ###
|
@ -80,9 +80,10 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
number = Column(String, unique=True) # Task Order Number
|
||||
loa = Column(String) # Line of Accounting (LOA)
|
||||
custom_clauses = Column(String) # Custom Clauses
|
||||
|
||||
signer_dod_id = Column(String)
|
||||
signed_at = Column(DateTime)
|
||||
level_of_warrant = Column(Numeric(scale=2))
|
||||
unlimited_level_of_warrant = Column(Boolean)
|
||||
|
||||
@hybrid_property
|
||||
def csp_estimate(self):
|
||||
|
19
templates/portfolios/blank_slate.html
Normal file
19
templates/portfolios/blank_slate.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% from "components/empty_state.html" import EmptyState %}
|
||||
{% from "components/tooltip.html" import Tooltip %}
|
||||
|
||||
{% block global_sidenav %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{
|
||||
EmptyState(
|
||||
action_href=url_for("task_orders.new", screen=1),
|
||||
action_label=("portfolios.index.empty.start_button" | translate),
|
||||
icon="cloud",
|
||||
message=("portfolios.index.empty.title" | translate),
|
||||
)
|
||||
}}
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user