Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [propel] Using Creole to generate xml schema from db.

propel
Discussion topic

Back to topic list

Re: [propel] Using Creole to generate xml schema from db.

Reply

Author hlellelid
Full name Hans Lellelid
Date 2004-03-31 07:50:26 PST
Message Hi -

> On Mar 31, 2004, at 9:16 AM, Hans Lellelid wrote:
>> Yes, if you update from CVS (both Creole and Propel, actually) it
>> should
>> now work for you -- or at *least* provide some better error messages
>> if it
>> doesn't.
>
> It is working in the sense that it is generating the schema.sql and
> having no errors.

Ok, good. :)

>> I just ran a test on a database using MySQL. While running this test I
>> discovered some other issues w/ the MySQL metadata support: for
>> example,
>> ENUM(...) columns were not being recognized. Also, there was a
>> compilation error related to accessibility of a variable in
>> MySQLDatabaseInfo class. Both of these issues have been fixed in CVS.
>>
>
> This is what happens to my enum type:
> <column name="type" type="CHAR"/>
> The original is:
> `type`
> enum('A','AAAA','CNA​ME','HINFO','MX','NS​','PTR','RP','SRV','​TXT','URL')
> default NULL,

Yeah, there is not good support for ENUM, since it's MySQL-specific. The
best solution for this, I think, would be to use one of the new Validator
classes. It's not quite the same, but should allow you to easily force
the values to be one of those.

> A couple other notes...when modifying the schema.xml I added:
>
> <foreign-key foreignTable="accounts" onDelete="cascade">
> <reference local="aid" foreign="id"/>
> </foreign-key>
> <foreign-key foreignTable="soa" onDelete="cascade">
> <reference local="zone" foreign="id"/>
> </foreign-key>
>
> This does nothing when generating the mysql code when in fact it could
> generate:
> CONSTRAINT `fk_zone` FOREIGN KEY (`zone`) REFERENCES `soa` (`id`) ON
> DELETE CASCADE ON UPDATE CASCADE,
> CONSTRAINT `fk_aid` FOREIGN KEY (`aid`) REFERENCES `accounts` (`id`)
> ON DELETE CASCADE ON UPDATE CASCADE
>
> Although that is mysql4.0+ specific I think.

That's good to know ... I wonder if this would generate problems w/ 3.x or
if it would just be ignored. I'm actually fine w/ requiring 4.0+ since
we're building for PHP5 ... i.e. anyone running PHP5 will probably be
using a new MySQL. Of course this will only apply to the InnoDB tables,
so the emulation will still need to be supported if using MyISAM tables.
As long as it doesn't cause a MySQL error when using MyISAM tables, we
should definitely add this, though.

> Other things seem to be working so far. :)

Good, good :) & please let us know about any of these little things that
need to be fixed. We're working to make this stable & usable and need all
the feedback we can get.

Thanks,
Hans

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@pr​opel.tigris.org
For additional commands, e-mail: users-help at propel dot tigris dot org

« Previous message in topic | 6 of 6 | Next message in topic »

Messages

Show all messages in topic

[propel] Using Creole to generate xml schema from db. davidu David A. Ulevitch 2004-03-31 06:02:42 PST
     Re: [propel] Using Creole to generate xml schema from db. hlellelid Hans Lellelid 2004-03-31 07:16:05 PST
         Re: [propel] Using Creole to generate xml schema from db. davidu David A. Ulevitch 2004-03-31 07:43:09 PST
             Re: [propel] Using Creole to generate xml schema from db. davidu David A. Ulevitch 2004-03-31 07:45:02 PST
                 Re: [propel] Using Creole to generate xml schema from db. hlellelid Hans Lellelid 2004-03-31 07:52:15 PST
             Re: [propel] Using Creole to generate xml schema from db. hlellelid Hans Lellelid 2004-03-31 07:50:26 PST
Messages per page: