nciri / zend-db-model-generator

Automatically exported from code.google.com/p/zend-db-model-generator
0 stars 0 forks source link

Not working properly with PostgreSQL 8.x #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use PostgreSQL, instead of MySQL
2. Installed PDO_pgsql, included with PHP's PostgreSQL support with the
LAPP install
3. Ran the script thru CLI with commands: php zend-db-model-generator.php
--database <database name> --table <table name>

What is the expected output? What do you see instead?
Since it uses PDO, it may be able to process PostgreSQL since I have PDO
driver for it installed. I got the following messages:
Fatal error: Uncaught exception 'Exception' with message '`show create
table discounttype` returned false!.' in
/home/titus/public_html/zdmg/class/MakeDbTable.php:190
Stack trace:
#0 /home/titus/public_html/zdmg/class/MakeDbTable.php(179):
MakeDbTable->parseForeignKeys()
#1 /home/titus/public_html/zdmg/zend-db-model-generator.php(52):
MakeDbTable->parseTable()
#2 {main}
  thrown in /home/titus/public_html/zdmg/class/MakeDbTable.php on line 190

What version of the product are you using? On what operating system?
I used zdmg-0.5rc1 on Ubuntu 9.10, with Synaptic provided LAPP setup.

Please provide any additional information below.
I think the suspect of using MySQL-specific commands like 'show create
table' limits the usage of this great project. I hope you'd make this more
DBMS agnostic to make this more usable for more people. Thanks and more power!

Original issue reported on code.google.com by titomari...@gmail.com on 12 Feb 2010 at 6:48

GoogleCodeExporter commented 8 years ago
this is an excellent idea. thanks a lot for your feedback.
I'll take it into consideration on my next release.

Original comment by kfirufk@gmail.com on 21 Feb 2010 at 1:29

GoogleCodeExporter commented 8 years ago
I'd like to contribute my postgresql solution to the project. Tested on Linux, 
PostgreSQL 8.4.

Original comment by istvan.c...@gmail.com on 23 Jun 2010 at 12:08

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for your contribution. i'll merge it with current svn tree, create a 
code sample and upload a new version. expect a new release in the next couple 
of days.

Original comment by kfirufk@gmail.com on 23 Jun 2010 at 2:04

GoogleCodeExporter commented 8 years ago
unfortunately I still have problems using this script. if you can provide a 
dump for a db structure that the script actually did work it, it would be 
great. still has some testing to do.

Original comment by kfirufk@gmail.com on 29 Jun 2010 at 12:29

GoogleCodeExporter commented 8 years ago
Thanks for this project..

I would like to contribute with the class file for PostgreSQL.

Tested on linux (Fedora 14),zdmg-0.6, PostgreSQL 9.0

Original comment by abiliofe...@gesticumpre.pt on 26 Aug 2011 at 10:38

Attachments:

GoogleCodeExporter commented 8 years ago
thank you. i commited it to the main branch. this class will be available in 
the next minor version.

Original comment by kfirufk@gmail.com on 28 Aug 2011 at 9:04

GoogleCodeExporter commented 8 years ago
it's in 0.7RC1 :)

Original comment by kfirufk@gmail.com on 27 Feb 2012 at 1:57