Version Everything, Including the Database Code
The Perforce motto is "Version Everything". But few people include database code in “everything”. That's why DBmaestro TeamWork™ and Perforce complement and complete each other.
Working with files and scripts is very different than working with a database. For example, a database is a centralized and shared resource that must be synchronized among the entire team. And database objects have their own syntax for creation and modification. These differences are quite important, and must be carefully considered.
There are several possible methods to employ when working with a database. For example, each developer can work in a sandbox environment, which is similar to having a local directory for the files. Or, database schema(s) can be shared between teams.
Both of these methods offer tremendous benefits, but in order to realize those advantages, these version control best practices must be followed:
- Version each and every change. No one can modify an object within the database without documenting the change. When you use Perforce to manage your files, this feature is automatic. In order to achieve this in the database environment, you must have a database enforced change management method that prevents out-of-process changes.
- Synchronize between the team in order to prevent conflicts. Having an indication in the Version Control UI is not enough to prevent code overrides and other problems. Integration with the database engine is required to minimize the risk of issues.
- Streamline and simplify the process of merging parallel development from different environments. With Perforce, conflict notification and merges occur when changes are submitted. But with database development, developers who are not connected to the database must compile changes and manually check for syntax errors. In order to streamline the merge process during parallel development, a three-way analysis comparing the live database schema and a baseline is required.
- Empower the team to collect all changes from a single source and wrap them into a deploy unit. This is important, regardless of whether they are working in Waterfall or Agile. The process must be more than a simple copy and paste, and should exist for the database code as well, although it will be slightly different. The process for database deployment, especially when working in Agile or DevOps, should be easy to use and fully automated, to prevent developers from executing the wrong changes.
In order to follow Perforce's “Version Everything” motto, and include database code changes, you must have a Database Enforced Change Management solution. Extending Perforce with DBmaestro TeamWork will make your development, deployment, and operation environment more comprehensive and complete.
Read the full article here.