Re: moving forward: thanks for feedback
| From: | Brett Bieber | Date: | Fri, 29 Sep 2006 03:08:04 +0000 |
| Subject: | Re: moving forward: thanks for feedback | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-44166@lists.php.net to get a copy of this message | ||
> For those of you who volunteered to help with pearweb, there is a simple
> task I would like to ask. One of the first steps in migrating pearweb
> to the next level is going to be making it easier to install the
> database and get it running. As such, the friendliest option I see at
> the moment is using MDB2_Schema and its ability to create and update
> databases as changes are made.
>
I agree on this.
> To this end, I just committed pearweb/sql/pearweb_msb2schema.xml. This
> contains only the structure, but I envision also having a schema file
> containing sample data, that can be used to set up a working environment.
>
> Those with more MDB2_Schema experience can help by checking out the
> file, seeing if it really lines up appropriately with the .sql files in
> the same directory.
>
> One concern I have is that all mysql-specific sets are converted into
> simple text fields. If there is a way to tell MDB2_Schema to use a set
> type when installing to a mysql database, that would be very good to
> know. Otherwise, I'll go through the code and make sure that we are
> validating input properly in places where it may have relied upon the
> database constraints to catch errors.
The xml file looks pretty good... there are a few differences between
the xml MDB2_Schema will reverse engineer a database to, and what it
can actually use for creation.
The text fields with no length needed to be changed to clobs with no
default value. Of those text fields, only one was indexed... which I
modified to index 255. Also looks like MDB2_Schema doesn't like
CURRENT_TIMESTAMP for a default value, nor 'releases' or 'order.' I'm
not sure if there are options for quoting field names for the creation
statements, but attached is what I had to do to get MDB2_Schema to
successfully create from the xml file. The largest issues were field
names I had to modify to get MDB2_Schema to create.... order ->
ordering and release->release_v
Lukas or Igor, any thoughts on the 'release' field issue...? How to
resolve reserved keywords for field names?
I'll begin familiarizing myself with some pearweb to help out in any way I can.
--
-Brett
http:saltybeagle.com aim:ianswerq
Index: pearweb_mdb2schema.xml =================================================================== RCS file: /repository/pearweb/sql/pearweb_mdb2schema.xml,v retrieving revision 1.1 diff -u -r1.1 pearweb_mdb2schema.xml --- pearweb_mdb2schema.xml 28 Sep 2006 22:30:12 -0000 1.1 +++ pearweb_mdb2schema.xml 29 Sep 2006 02:55:42 -0000 @@ -54,9 +54,8 @@ <field> <name>ldesc</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -150,6 +149,7 @@ <field> <name>ldesc</name> <sorting>descending</sorting> + <length>255</length> </field> </index> @@ -214,9 +214,8 @@ <field> <name>comment</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -224,6 +223,7 @@ <field> <name>comment</name> <sorting>descending</sorting> + <length>255</length> </field> </index> @@ -258,7 +258,6 @@ <name>ts</name> <type>timestamp</type> <notnull>false</notnull> - <default>CURRENT_TIMESTAMP</default> </field> <field> @@ -345,16 +344,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -633,7 +630,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>text</type> <length>20</length> <notnull>true</notnull> @@ -681,9 +678,9 @@ </field> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -735,7 +732,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -790,9 +787,9 @@ </index> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -861,7 +858,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -1175,9 +1172,8 @@ <field> <name>note</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <index> @@ -1307,7 +1303,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>text</type> <length>20</length> <notnull>true</notnull> @@ -1421,16 +1417,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1567,16 +1561,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -1589,9 +1581,8 @@ <field> <name>source_links</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -1610,9 +1601,8 @@ <field> <name>status</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -1675,9 +1665,8 @@ <field> <name>comment</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -1736,7 +1725,7 @@ <declaration> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>false</notnull> @@ -1760,9 +1749,9 @@ </field> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -1827,16 +1816,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1848,9 +1835,8 @@ <field> <name>releasenotes</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1946,7 +1932,7 @@ </field> <field> - <name>order</name> + <name>ordering</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -2068,9 +2054,8 @@ <field> <name>userinfo</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -2083,9 +2068,8 @@ <field> <name>pgpkey</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field>
Index: pearweb_mdb2schema.xml =================================================================== RCS file: /repository/pearweb/sql/pearweb_mdb2schema.xml,v retrieving revision 1.1 diff -u -r1.1 pearweb_mdb2schema.xml --- pearweb_mdb2schema.xml 28 Sep 2006 22:30:12 -0000 1.1 +++ pearweb_mdb2schema.xml 29 Sep 2006 02:55:42 -0000 @@ -54,9 +54,8 @@ <field> <name>ldesc</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -150,6 +149,7 @@ <field> <name>ldesc</name> <sorting>descending</sorting> + <length>255</length> </field> </index> @@ -214,9 +214,8 @@ <field> <name>comment</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -224,6 +223,7 @@ <field> <name>comment</name> <sorting>descending</sorting> + <length>255</length> </field> </index> @@ -258,7 +258,6 @@ <name>ts</name> <type>timestamp</type> <notnull>false</notnull> - <default>CURRENT_TIMESTAMP</default> </field> <field> @@ -345,16 +344,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -633,7 +630,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>text</type> <length>20</length> <notnull>true</notnull> @@ -681,9 +678,9 @@ </field> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -735,7 +732,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -790,9 +787,9 @@ </index> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -861,7 +858,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -1175,9 +1172,8 @@ <field> <name>note</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <index> @@ -1307,7 +1303,7 @@ </field> <field> - <name>release</name> + <name>release_v</name> <type>text</type> <length>20</length> <notnull>true</notnull> @@ -1421,16 +1417,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1567,16 +1561,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -1589,9 +1581,8 @@ <field> <name>source_links</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <field> @@ -1610,9 +1601,8 @@ <field> <name>status</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -1675,9 +1665,8 @@ <field> <name>comment</name> - <type>text</type> + <type>clob</type> <notnull>true</notnull> - <default></default> </field> <index> @@ -1736,7 +1725,7 @@ <declaration> <field> - <name>release</name> + <name>release_v</name> <type>integer</type> <length>11</length> <notnull>false</notnull> @@ -1760,9 +1749,9 @@ </field> <index> - <name>release</name> + <name>release_v</name> <field> - <name>release</name> + <name>release_v</name> <sorting>ascending</sorting> </field> </index> @@ -1827,16 +1816,14 @@ <field> <name>summary</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> <name>description</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1848,9 +1835,8 @@ <field> <name>releasenotes</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -1946,7 +1932,7 @@ </field> <field> - <name>order</name> + <name>ordering</name> <type>integer</type> <length>11</length> <notnull>true</notnull> @@ -2068,9 +2054,8 @@ <field> <name>userinfo</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field> @@ -2083,9 +2068,8 @@ <field> <name>pgpkey</name> - <type>text</type> + <type>clob</type> <notnull>false</notnull> - <default></default> </field> <field>