Add columns for on whose behalf agreement signed

This is changing because we’re going to introduce accepting contracts
and MoUs online.

Previously
---
We had one column for who signed the agreement, which is foreign keyed
to the user table. This is still relevant, because there will always be
a user who is clicking the button.

Now
---
We add two new fields for the name and email address of the person on
whose behalf the agreement is being accepted. This person:
- is different from the one signing the agreement
- won’t necessarily have a Notify account
This commit is contained in:
Chris Hill-Scott
2019-06-13 16:43:34 +01:00
parent 3cde623ce2
commit 8977f5193e
3 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
"""
Revision ID: 0296_agreement_signed_by_person
Revises: 0295_api_key_constraint
Create Date: 2019-06-13 16:40:32.982607
"""
from alembic import op
import sqlalchemy as sa
revision = '0296_agreement_signed_by_person'
down_revision = '0295_api_key_constraint'
def upgrade():
op.add_column('organisation', sa.Column('agreement_signed_on_behalf_of_email_address', sa.String(length=255), nullable=True))
op.add_column('organisation', sa.Column('agreement_signed_on_behalf_of_name', sa.String(length=255), nullable=True))
def downgrade():
op.drop_column('organisation', 'agreement_signed_on_behalf_of_name')
op.drop_column('organisation', 'agreement_signed_on_behalf_of_email_address')