feat/datasource
parent
7c41f71248
commit
7f7ea92a45
@ -0,0 +1,45 @@
|
|||||||
|
"""add_pipeline_info_7
|
||||||
|
|
||||||
|
Revision ID: 70a0fc0c013f
|
||||||
|
Revises: 224fba149d48
|
||||||
|
Create Date: 2025-06-17 19:05:39.920953
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import models as models
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '70a0fc0c013f'
|
||||||
|
down_revision = '224fba149d48'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_table('document_pipeline_execution_logs',
|
||||||
|
sa.Column('id', models.types.StringUUID(), server_default=sa.text('uuid_generate_v4()'), nullable=False),
|
||||||
|
sa.Column('pipeline_id', models.types.StringUUID(), nullable=False),
|
||||||
|
sa.Column('document_id', models.types.StringUUID(), nullable=False),
|
||||||
|
sa.Column('datasource_type', sa.String(length=255), nullable=False),
|
||||||
|
sa.Column('datasource_info', sa.Text(), nullable=False),
|
||||||
|
sa.Column('input_data', sa.JSON(), nullable=False),
|
||||||
|
sa.Column('created_by', models.types.StringUUID(), nullable=True),
|
||||||
|
sa.Column('created_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
||||||
|
sa.PrimaryKeyConstraint('id', name='document_pipeline_execution_log_pkey')
|
||||||
|
)
|
||||||
|
with op.batch_alter_table('document_pipeline_execution_logs', schema=None) as batch_op:
|
||||||
|
batch_op.create_index('document_pipeline_execution_logs_document_id_idx', ['document_id'], unique=False)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('document_pipeline_execution_logs', schema=None) as batch_op:
|
||||||
|
batch_op.drop_index('document_pipeline_execution_logs_document_id_idx')
|
||||||
|
|
||||||
|
op.drop_table('document_pipeline_execution_logs')
|
||||||
|
# ### end Alembic commands ###
|
||||||
Loading…
Reference in New Issue