FLEXIcontent / flexicontent-cck

Advanced content management for Joomla
http://www.flexicontent.org
83 stars 53 forks source link

dhpam_flexicontent_templates Primary key does not exisit #221

Closed tristanbailey closed 9 years ago

tristanbailey commented 9 years ago

When updating Updating Flexicontent 2 to 3 and running the com updates 3 b7 version

Create DB indexes : Can't DROP 'PRIMARY'; check that column/key exists SQL=ALTER TABLE dhpam_flexicontent_templates DROP PRIMARY KEY, ADD PRIMARY KEY(template, cfgname, layout, position)

So I:

The table has not pri key it was called "tr", so I ran in the db, and it was happy: ALTER TABLE dhpam_flexicontent_templates ADD PRIMARY KEY(template, cfgname, layout, position)

ggppdk commented 9 years ago

Our v2.2.x installation SQL has: CREATE TABLE IF NOT EXISTS #__flexicontent_templates ( ... PRIMARY KEY (template,layout,position)

so normally the Primary key should exist i verified the above, i installed v2.2.0 and then upgraded to v3.0.0 BETA7d

for some reason the PRIMARY key was missing in your DB

tristanbailey commented 9 years ago

Yes I've a blog I've kept updating. Just thought it might be an edge case to be aware of

ggppdk commented 9 years ago

Will check older installation scripts of v1.5.x, it seems we need to update this in the case of much older flexicontent installation

ggppdk commented 9 years ago

I checked the PRIMARY KEY index is there in very early v1.5.x installation scriptis there, so this was an issolated/rare case, will not add special code to handle this.

Thanks for reporting though

ggppdk commented 9 years ago

This was found and fixed in a v3.0.x version