Skip to content

Commit 9c7927c

Browse files
committed
Add creation/modification time to function table
1 parent 5953ba9 commit 9c7927c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""Add creation/modification time to functions
2+
3+
Revision ID: 32a9ab5fa107
4+
Revises: 7cefc13e3b2b
5+
Create Date: 2025-05-14 06:33:48.965615+00:00
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
12+
# revision identifiers, used by Alembic.
13+
revision = "32a9ab5fa107"
14+
down_revision = "7cefc13e3b2b"
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.add_column(
22+
"funcapi_functions",
23+
sa.Column(
24+
"created", sa.DateTime(), server_default=sa.text("now()"), nullable=False
25+
),
26+
)
27+
op.add_column(
28+
"funcapi_functions",
29+
sa.Column(
30+
"modified", sa.DateTime(), server_default=sa.text("now()"), nullable=False
31+
),
32+
)
33+
# ### end Alembic commands ###
34+
35+
36+
def downgrade():
37+
# ### commands auto generated by Alembic - please adjust! ###
38+
op.drop_column("funcapi_functions", "modified")
39+
op.drop_column("funcapi_functions", "created")
40+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)