blob: 6f337beafa82ccf28c17657f7dd85c638c63388b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me>
#
# SPDX-License-Identifier: BSD-3-Clause
"""Track webmention digest notifications
Revision ID: 408fc2eca9ce
Revises: be6e229d6a3d
Create Date: 2026-10-29 20:24:42.008723
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "408fc2eca9ce"
down_revision = "be6e229d6a3d"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("received_webmentions", schema=None) as batch_op:
batch_op.add_column(
sa.Column("notification_sent_at", sa.DateTime(timezone=True), nullable=True)
)
op.execute(
"UPDATE received_webmentions SET notification_sent_at = CURRENT_TIMESTAMP"
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("received_webmentions", schema=None) as batch_op:
batch_op.drop_column("notification_sent_at")
# ### end Alembic commands ###
|