def upgrade():
    """Upgrade database."""
    op.create_table(
        'records_buckets',
        sa.Column(
            'record_id',
            sqlalchemy_utils.types.uuid.UUIDType(),
            nullable=False),
        sa.Column(
            'bucket_id',
            sqlalchemy_utils.types.uuid.UUIDType(),
            nullable=False),
        sa.ForeignKeyConstraint(['bucket_id'], [u'files_bucket.id'], ),
        sa.ForeignKeyConstraint(['record_id'], [u'records_metadata.id'], ),
        sa.PrimaryKeyConstraint('record_id', 'bucket_id')
    )
def upgrade ( ) : op . create_table ( 'records_buckets' , sa . Column ( 'record_id' , sqlalchemy_utils . types . uuid . UUIDType ( ) , nullable = False ) , sa . Column ( 'bucket_id' , sqlalchemy_utils . types . uuid . UUIDType ( ) , nullable = False ) , sa . ForeignKeyConstraint ( [ 'bucket_id' ] , [ u'files_bucket.id' ] , ) , sa . ForeignKeyConstraint ( [ 'record_id' ] , [ u'records_metadata.id' ] , ) , sa . PrimaryKeyConstraint ( 'record_id' , 'bucket_id' ) )
Upgrade database.