Jump to content

4.0 Developer Center - Database Schema Management

When developing, modifying the database schema (such as adding a column to a table) can be surprisingly time consuming. Currently, we have to:

  • Make the change locally
  • Change the installer
  • Add the query to make the change to the upgrader for whatever version we're working on
  • Let the other developers know so they can run the query to make the change in their installs.


This can cause issues, especially at the last step - we currently use a large .sql file in the trunk directory of our repository which we add queries to that we need everyone else to run - sometimes, one of us doesn't notice this has been updated. I'm sure also, third party modification authors are familiar with this annoyance.


In 4.0, one of the things I really wanted to do was build a central "Developer Center" from which both us and modification authors can manage aspects of the application without digging into installer/upgrader files, XML files and manually copying and pasting things when creating a new module or extension.

Part of this developer centre is a GUI for modifying the database schema. When you make changes, the changes will automatically be ran against your local database and added into the installer and upgrader. Internally, we'll also then have a special script which runs when we SVN update to copy these changes over when another developer makes a change.


The first page in the Database Schema Management will be a list of tables:


You can add a table to the list either by creating a new table, importing a table which is already in the database or uploading a .sql file containing a CREATE TABLE statement:




When you edit a table, you can manage the columns, indexes and rows which are inserted by default:


If you try to edit a table and your local database does not match what the schema has, you'll be shown the conflicts:




This, plus the other features in the Developer Center, which we'll talk about in later blog entries, make the process of developing applications easier for both us, and third party authors.




Fun fact: I'm writing this blog entry from the home of IPS in Lynchburg, VA rather than my usual office in the UK :smile:

×
×
  • Create New...