2018-05-22 14:49:48 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Revision ID: 0194_ft_billing_created_at
|
|
|
|
|
Revises: 0193_add_ft_billing_timestamps
|
|
|
|
|
Create Date: 2018-05-22 14:34:27.852096
|
|
|
|
|
|
|
|
|
|
"""
|
2024-04-01 15:12:33 -07:00
|
|
|
|
2018-05-22 14:49:48 +01:00
|
|
|
import sqlalchemy as sa
|
2023-12-08 21:43:52 -05:00
|
|
|
from alembic import op
|
2018-05-22 14:49:48 +01:00
|
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
|
|
2023-08-29 14:54:30 -07:00
|
|
|
revision = "0194_ft_billing_created_at"
|
|
|
|
|
down_revision = "0193_add_ft_billing_timestamps"
|
2018-05-22 14:49:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
|
op.execute("UPDATE ft_billing SET created_at = NOW()")
|
2023-08-29 14:54:30 -07:00
|
|
|
op.alter_column("ft_billing", "created_at", nullable=False)
|
2018-05-22 14:49:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
2023-08-29 14:54:30 -07:00
|
|
|
op.alter_column("ft_billing", "created_at", nullable=True)
|
2018-05-22 14:49:48 +01:00
|
|
|
op.execute("UPDATE ft_billing SET created_at = null")
|