mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-03 05:09:13 -04:00
Add notes column to services table
This commit is contained in:
@@ -487,6 +487,8 @@ class Service(db.Model, Versioned):
|
||||
organisation_id = db.Column(UUID(as_uuid=True), db.ForeignKey('organisation.id'), index=True, nullable=True)
|
||||
organisation = db.relationship('Organisation', backref='services')
|
||||
|
||||
notes = db.Column(db.Text, nullable=True)
|
||||
|
||||
email_branding = db.relationship(
|
||||
'EmailBranding',
|
||||
secondary=service_email_branding,
|
||||
|
||||
27
migrations/versions/0338_add_notes_to_service.py
Normal file
27
migrations/versions/0338_add_notes_to_service.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0338_add_notes_to_service
|
||||
Revises: 0337_broadcast_msg_api
|
||||
Create Date: 2021-01-13 11:50:06.333369
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0338_add_notes_to_service'
|
||||
down_revision = '0337_broadcast_msg_api'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('services', sa.Column('notes', sa.Text(), nullable=True))
|
||||
op.add_column('services_history', sa.Column('notes', sa.Text(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('services_history', 'notes')
|
||||
op.drop_column('services', 'notes')
|
||||
# ### end Alembic commands ###
|
||||
@@ -261,6 +261,7 @@ def test_get_service_by_id(admin_request, sample_service):
|
||||
'letter_branding',
|
||||
'message_limit',
|
||||
'name',
|
||||
'notes',
|
||||
'organisation',
|
||||
'organisation_type',
|
||||
'permissions',
|
||||
|
||||
Reference in New Issue
Block a user