Revert "Fix alembic version ordering."

This reverts commit 2c31b304a56d54a1e5febeac0abc02c35cf97208.
Revert "Threading algorithm"

This reverts commit c093ac34903dac74959603099530145e7cf038bc.

Reason for rollback: migration doesn't work.