Links to know aboutMusic The Chiara String Quartet Chiara Quartet (MySpace) Greenwood Music Camp UNL School of Music PHP PEAR Installer Manifesto phpDocumentor PEAR phar docblock PHP_Parser PHP_Parser_DocblockParser PHP_ParserGenerator PHP_LexerGenerator PEAR_PackageFileManager PHP_Archive Games_Chess Blogs Joshua Eichorn Paul M. Jones Davey Shafik Popular EntriesSetting up your own PEAR channel with Chiara_PEAR_Server - the official way
(28) Do you develop a website? It is infinitely better to synchronize live and development sites using the PEAR Installer(25) doing the PEAR thing(19) Using PEAR 1.4.0 to install PEAR packages on a remote host(19) PEAR now fits in a bottle: meet go-pear.phar(17) CategoriesPowered by |
Saturday, October 29. 2005Bleeding Edge innovation: automatically initialize databases on installationTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Damn, that idea ran around in my head for months now, but I was to busy to implement it. Nice work!
Well you can get your .sql files, you can make MDB2_Schema skip doing the actual query but still generate the SQL by using the disable_query option, which in turns allows you to write the output into a .sql file, that way your users will have both options.
Nice work. I love to see progress on PHP deployment.
However, I'm not sure about upgrading via diff. What would happen, for example, if you rename a column. Would the upgrade drop the old column and add a new one, losing any values that might have been in that field?
Hi Jeff,
If you rename a column, it would indeed be dropped. A post-installation script would be the perfect place to implement just such a change. tasks in PEAR are designed only for relatively simple transformations - even this task is a bit of a stretch to the design of tasks. However, if used judiciously, it will function wonderfully. In terms of renaming a column, that usually implies a radical shift in design, and automating changes of this nature is almost always a bad idea
While it doesn't do diffs, DB_Table does create the table for you on first run, and without any XML (the schema is stored in the object as a PHP array, which has other benefits such as auto-validation and fast form generation).
http://pear.php.net/DB_Table
Jeff:
In MDB2_Schema then you use the "was" tag when you are updating field/table names if you don't want to lose the values. Paul: Well DB_Table does do anything remotely like MDB2_Schema, they are kinda on different ends what they do in regards to databases
I stand corrected: this is far more powerful than I realized it was
Perhaps Lukas could elucidate the full range of possibility... Greg
Here is the old documentation Manuel wrote:
http://www.backendmedia.de/MDB2/docs/xml_schema_documentation.html Its missing some of the new features added like the "primary", "autoincrement", "overwrite", and "length" tags in index fields .. |
Links in this articlePEAR Installer ManifestoCalendar
QuicksearchMy Latest ReleasesTop Exitspear.php.net (305)
www.php.net (86) pear.chiaraquartet.net (79) pecl.php.net (58) news.php.net (43) Blog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||