-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathc05fd0a62deb_create_task_data_table.py
More file actions
45 lines (37 loc) · 1.51 KB
/
c05fd0a62deb_create_task_data_table.py
File metadata and controls
45 lines (37 loc) · 1.51 KB
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
40
41
42
43
44
45
"""create task data table
Revision ID: c05fd0a62deb
Revises: 9812335c52b6
Create Date: 2025-11-12 10:53:48.450263
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c05fd0a62deb'
down_revision = '9812335c52b6'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('tasks',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('owner', sa.String(), nullable=True),
sa.Column('proxy', sa.String(), nullable=True),
sa.Column('parameters', sa.String(), nullable=True),
sa.Column('compute_resources', sa.String(), nullable=True),
sa.Column('monitor_url', sa.String(), nullable=True),
sa.Column('output_log', sa.String(), nullable=True),
sa.Column('error_log', sa.String(), nullable=True),
sa.Column('status', sa.String(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('started_at', sa.DateTime(), nullable=True),
sa.Column('finished_at', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_tasks_name'), 'tasks', ['name'], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_tasks_name'), table_name='tasks')
op.drop_table('tasks')
# ### end Alembic commands ###