Files
notifications-api/migrations/versions/0031_store_personalisation.py
Adam Shimali 731bb19a9c Template and personalisation content is now merged and returned with
notifications, when retrieved by notification id, or service id (i.e.
all notifications for service).

There is a new element returned at top level of notification json called
body, which is the template content merged with personalisation. This
is consistent with api to endpoint to create notification which returns
what was sent as 'body' in json response.

Merging of template with personalisation is done in the
NotificationStatusSchema.

Personalisation data in encrypted before storing in db.
2016-06-20 16:49:17 +01:00

27 lines
690 B
Python

"""empty message
Revision ID: 0031_store_personalisation
Revises: 0030_service_id_not_null
Create Date: 2016-06-20 10:39:50.892847
"""
# revision identifiers, used by Alembic.
revision = '0031_store_personalisation'
down_revision = '0030_service_id_not_null'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('notifications', sa.Column('_personalisation', sa.String(), nullable=True))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('notifications', '_personalisation')
### end Alembic commands ###