This are just guidelines of how your environment could be set. First, use a Version Control System like Subversion or Git. Don't version config/config.php. When developing the app (on your local machine) set the following on config/config.php:

   !defined('AK_ENVIRONMENT') && define('AK_ENVIRONMENT','development');

All the web requests that you make will be run against the development DB. Once you're done with local changes, commit them to your repository and checkout on the production machine where you will need to set:

   !defined('AK_ENVIRONMENT') &&  define('AK_ENVIRONMENT','production');

Unit Tests

Any time you call:

  ./script/test unit

the environment will be set for you to 'testing'. The right thing to do is to locally test before committing. Akelos still doesn't have a remote deployment script, so you will need to run migrations on the remote server if there are database scheme changes.

Note: If you want to setup a deployment tool, be sure to check Fredistrano.