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 davidu
Full name David A. Ulevitch
Date 2004-03-31 07:43:09 PST
Message 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.

> 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,

> Thanks for trying this out. Sorry that this functionality is a little
> more "fringe" in terms of functionality and reliability. Hopefully now
> it'll all work, but let me know if not.

Not a problem.

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.

Other things seem to be working so far. :)

thanks,
davidu

ps: I am now on users@propel -- no more need to CC me. :)


--------------------​--------------------​--------------------​---------
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 | 3 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: