def downgrade():
op.add_column('dataset', sa.Column('organization_id', postgresql.UUID(), autoincrement=False, nullable=True))
op.execute('''
UPDATE "dataset" SET
organization_id = (meta->>'organization_id')::uuid
WHERE
meta->>'organization_id' IS NOT NULL
''')
op.drop_column('dataset', 'meta')
889fee1f3c80_add_meta_to_dataset.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录