Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • What database are you using? PostgreSQL does almost all DDL inside transactions. This makes it possible to apply a change as a single unit and rollback on failure. Oracle autocommits most DDL which makes cleaning up after problems a bigger issue.

    I would make creating an update atomic. State between commands makes thing more complicated. Locking is easier when it is inside a single program. db_update insert.sql update.sql delete.sql

    How do you deploy code changes? Database schema changes are usually tied to code changes. I would separate the database updates between backwards compatible changes that can work with old code, changes which break old code, and changes which require simultaneous updates. The ideal process is apply backwards compatible changes, update code, apply break-old-code changes. Avoid simultaneous updates is possible.

    The code is hopefully in a version control system; putting the update scripts in version control would make a lot of sense. One question is how to synchronize the numbering of updates between different developers. One possibility is to have a control file which lists updates and versions. The version control system would prevent conflicts.