-sudo -u vagrant cp config/example.database.yml config/database.yml
-sudo -u vagrant cp config/example.application.yml config/application.yml
+if [ ! -f config/database.yml ]; then
+ sudo -u vagrant cp config/example.database.yml config/database.yml
+fi
+if [ ! -f config/storage.yml ]; then
+ cp config/example.storage.yml config/storage.yml
+fi
+touch config/settings.local.yml
+# create the databases
+sudo -u vagrant bundle exec rails db:create
+# migrate the database to the latest version
+sudo -u vagrant bundle exec rails db:migrate