refactor of migrations
added migrations.rst
add assertion for weights and normalization in ranks and added to tests