Database migration script for v2.0

Closes #23