Comments for "DbDeploy"

» Submit Your Comment
Please log in to enter your comment. If you are not a registered PEAR developer, you can comment by sending an email to pear-dev@lists.php.net.
» Comments
  • Till Klampaeckel  [2007-09-17 09:43 UTC]

    Curious - is "DbDeploy" another word for schema?

    I'm sorry if I fail to understand, but can you elaborate on the differences. E.g., why should I use DbDeploy when I use a schema?
  • Alan Knowles  [2007-09-17 23:42 UTC]

    Can you make the sources browse-able online. (just link to subversion on sourceforge)

    - DbDeploy is not really a PEAR compatible package name.
    DB_Deploy should be OK.

    The syntax packages should be something like:
    DB_Deploy_Syntax_MSSQL etc.
    and the directory structure should map with the _ => /

    Coding standard need following - 4 spaces, brace locating etc, short ifs..

    The code could do with quite a bit of tidying up:

    eg.

    $sqlToPerformDeploy .= 'UPDATE ' . DbDeploy::$TABLE_NAME . ' SET complete_dt = ' . $this->dbmsSyntax->generateTimestamp() . ' WHERE change_number = ' . $fileChangeNumber . ' AND delta_set = \'' . $this->deltaSet . '\';' . "\n";
    $sqlToPerformDeploy .= '--------------- Fragment ends: ' . $fileChangeNumber . ' ---------------' . "\n";

    Would be considerably more readable as follows (and could still be improved)

    $sqlToPerformDeploy .=
    'UPDATE ' . DbDeploy::$TABLE_NAME .
    ' SET complete_dt = ' . $this->dbmsSyntax->generateTimestamp() .
    ' WHERE change_number = ' . $fileChangeNumber .
    ' AND delta_set = \'' . $this->deltaSet . "';\n" .

    '--------------- Fragment ends: ' . $fileChangeNumber .
    ' ---------------' . "\n";

    without understanding the code, does it really need lot's of set**** methods? - can that be simplified.. simpler API?

    the Abstract class DbmsSyntax appears to be rather pointless.. - Why not make the Syntax files extend the factory and throw an exception on that single method that is required.

    Factory class: case is a statement, not a function

    Looking at the Syntax drivers - can you see if MDB2 provides that ability - formating timestamp code... - rather than re-writing it..?

    Otherwise looks like a reasonable package to include.
  • Christian Weiske  [2009-06-25 08:03 UTC]

    Is this proposal dead, or are you going to finish it?