caktus/django-timepiece — pull request #674 by rebecca-caktus (2013-04-23 19:18:34+00:00)
Title: New app structure

refs #671 - Split Timepiece into modular apps
refs #94 - Remove existing migrations
refs #620 - Reorganize view structure
refs #517 - Reorganize test suite

I split the timepiece app into 5 co-dependent apps - `timepiece`, `timepiece.contracts`, `timepiece.crm`, `timepiece.entries`, and `timepiece.reports`. More work will need to be done to clean up each app. Existing migrations have been removed, and I've created new initial migrations for each app.

Tests pass and this runs locally while keeping existing data intact after doing the following to bootstrap the database:

./manage.py migrate timepiece --delete-ghost-migrations
./manage.py migrate reports
./manage.py migrate crm --fake
./manage.py migrate contracts --fake
./manage.py migrate entries --fake

Deployment to staging requires a more manual workflow than usual, just to run the migrations properly:

fab staging prod_to_staging
fab staging pull:'new-structure' # portal branch
fab staging update_requirements
fab staging install_timepiece_branch:'new-structure'
fab staging manage_run:'migrate','timepiece','--delete-ghost-migrations'
fab staging manage_run:'migrate','reports'
fab staging manage_run:'migrate','crm','--fake'
fab staging manage_run:'migrate','contracts','--fake'
fab staging manage_run:'migrate','entries','--fake'
fab staging deploy_static
fab staging touch