1 greg0ire Dec 18, 2008 17:08
3 afwas Jan 14, 2009 17:45
You wnat something like
`id` int(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
instead of
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
I had the same with one of my plugins. Don't ask me why but do appreciate that you are using a database abstraction layer that will check your code.
Good luck
4 greg0ire Feb 04, 2009 15:14
Ooops, I did not subscribe to this topic, sorry I did not reply...
@EdB : I did not hack anything, I created my own plugin. The thing is, when you code a plugin and you change the content of the GetDbLayout() function, you can change the version number of the plugin to force your database to be like what is written in the GetDbLayout() function. This is done by a $db->delta function, which compares the database with the function. The problem is it detects a column CONSTRAINT and tries to create it when I use the "far more correct" syntax.
@afwas : I'm glad this database abstraction layer exists, but I'd like it to support more kinds of syntax, that's all. By the way, what if you want to add a unique constraint on two fields if you can't just add this kind of line:
CONSTRAINT UNIQUE(field1, field2)
Thanks for you replies
Let me see if I understand correctly: you hacked a plugin that doesn't work and want to know why. If this is a fair understanding then I'll say "recode it till it works". Also make sure the plugin you started from works without issue THEN make it do what you want THEN see about how "not supported though far more correct" works out.