ZF-2293: Zend_Db_Adapter_Pdo_Sqlite::describeTable() bugs
Description
if you've a varchar(50) field in a table, describeTable() method will return that the field type is "varchar(50)" instead of "varchar" width length = 50
in the code i can see some "@todo" comments but this task is very simple to complete because you can simply copy the code of the mysql adapter
Comments
Posted by Fabrizio Balliano (balliano) on 2007-12-28T02:53:16.000+0000
what about this issue?
Posted by Darby Felton (darby) on 2008-01-10T10:24:02.000+0000
Care to contribute a patch? :)
Posted by Fabrizio Balliano (balliano) on 2008-01-10T10:34:26.000+0000
if you lool at the same function for pdo_mysql you'll find that with a 5 min cut/paste this bug will be fixed
Posted by Darby Felton (darby) on 2008-01-29T14:22:42.000+0000
Resolved for 1.5.0 RC1 with SVN r7686.
Posted by Darby Felton (darby) on 2008-01-29T14:25:15.000+0000
Resolved for 1.0.4 with SVN r7687.
Posted by Fabrizio Balliano (balliano) on 2008-01-30T02:19:33.000+0000
hi and thank for the fix but this is only partial, cause it doesn't care about
'SCALE' => null, // @todo 'PRECISION' => null, // @todo 'UNSIGNED' => null, // @todo
Posted by Fabrizio Balliano (balliano) on 2008-01-30T02:23:09.000+0000
ok reading the sqlite3 documentation it seems that it doesn't have unsigned data thus the "unsigned" index of the describetable could remain NULL
Posted by Fabrizio Balliano (balliano) on 2008-01-30T02:38:43.000+0000
i created a patch to solve the problems above, it's been created agains r7686 do you think it could be added soon?
225,227c225 < list($length, $scale, $precision, $unsigned, $primary, $primaryPosition, $identity) < = array(null, null, null, null, false, null, false);
<
< 'UNSIGNED' => $unsigned,
Posted by Fabrizio Balliano (balliano) on 2008-01-30T02:40:03.000+0000
attaching the patch as a file: diff Sqlite.php Sqlite.php.old
Posted by Darby Felton (darby) on 2008-01-30T07:34:23.000+0000
Reopening issue
Posted by Darby Felton (darby) on 2008-01-31T08:49:29.000+0000
Unfortunately, I cannot use your patch until you have signed a Contributor License Agreement, but I think I can figure it out independently. Once you've signed the CLA, you can work on just about anything you like! Please consider it. :)
Posted by Fabrizio Balliano (balliano) on 2008-01-31T08:51:14.000+0000
i didn't know about the CLA, i'll do that but it you can take a look at the patch cause anyway it's really simple
Posted by Darby Felton (darby) on 2008-01-31T08:58:37.000+0000
Please check out SVN r7728, and let me know if this resolves the issue for you. Thanks! :)
Posted by Fabrizio Balliano (balliano) on 2008-01-31T09:07:48.000+0000
ok thank you, seems to work fine! :-) i think you can close the bug
Posted by Darby Felton (darby) on 2008-01-31T09:11:10.000+0000
Excellent! I'll mark this as fixed for the next minor release until I merge the changes over to the release-1.0 branch, so they can be in the upcoming 1.0.4 release, too. :)
Posted by Darby Felton (darby) on 2008-01-31T09:43:07.000+0000
Fixed for 1.0.4 with SVN 7730.