Move some logic into functions.
Install Doctrine database migrations.