Fix torrent migration and update backfill to compute torrent pieces
This commit is contained in:
parent
087c6828ad
commit
073b68cf0d
3 changed files with 149 additions and 123 deletions
|
@ -13,6 +13,8 @@ down_revision = '471caec2cb66'
|
|||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from util.migrate import UTF8LongText
|
||||
|
||||
def upgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('torrentinfo',
|
||||
|
@ -25,8 +27,8 @@ def upgrade(tables):
|
|||
)
|
||||
op.create_index('torrentinfo_storage_id', 'torrentinfo', ['storage_id'], unique=False)
|
||||
op.create_index('torrentinfo_storage_id_piece_length', 'torrentinfo', ['storage_id', 'piece_length'], unique=True)
|
||||
op.add_column(u'blobupload', sa.Column('piece_hashes', sa.Text(), nullable=False))
|
||||
op.add_column(u'blobupload', sa.Column('piece_sha_state', sa.Text(), nullable=True))
|
||||
op.add_column(u'blobupload', sa.Column('piece_hashes', UTF8LongText(), nullable=False))
|
||||
op.add_column(u'blobupload', sa.Column('piece_sha_state', UTF8LongText(), nullable=True))
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
|
|
Reference in a new issue