mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-17 04:58:50 -04:00
Add created_at and updated_at columns to ft_notification_status
Added created_at and updated_at to the ft_notification_status table in order to make it easier to track down any potential issues with the data. Also updated the command to populate the data to take created_at and updated_at into account and to simplify the command. This can all be done in the same commit since the table is not being used anywhere yet and can only be populated manually.
This commit is contained in:
23
migrations/versions/0195_ft_notification_timestamps.py
Normal file
23
migrations/versions/0195_ft_notification_timestamps.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0195_ft_notification_timestamps
|
||||
Revises: 0194_ft_billing_created_at
|
||||
Create Date: 2018-05-22 16:01:53.269137
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0195_ft_notification_timestamps'
|
||||
down_revision = '0194_ft_billing_created_at'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('ft_notification_status', sa.Column('created_at', sa.DateTime(), nullable=False))
|
||||
op.add_column('ft_notification_status', sa.Column('updated_at', sa.DateTime(), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('ft_notification_status', 'updated_at')
|
||||
op.drop_column('ft_notification_status', 'created_at')
|
||||
Reference in New Issue
Block a user