When developing a web application, it’s common for your feature development to be ahead of any data administration tools you might need. While some frameworks, such as django, have built in admin tools for managing your application’s data, many don’t. At my current job we use Zend Framework, and have rolled our own lightweight model layer which does not have any fancy automatic admin tools. In addition to supporting database pools and selectors for partitioning of data, it also has transparent caching of data. While this is good for speed, it precludes you from making any data storage changes without going through this model layer or the cache will get out of sync. For now, rather than doing any DB queries directly, we do them through CLI jobs built for a specific task (batch updates, etc). This works fairly well, but often things come up that aren’t yet supported in the application’s admin tools, such as changing a user’s status bits, etc.. Things that a CLI console would be useful for. (more…)