[Tags] Fails to install on ms SQL lite - null columns forbidden in primary key

alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-06-10 11:38

sql statement ALTER TABLE g2_TagItemMap ADD PRIMARY KEY (g_itemId, g_tagId) fails during module installation on MS SQLite database - a little bit of digging reveals this error:

Msg 8111, Level 16, State 1, Line 1
Cannot define PRIMARY KEY constraint on nullable column in table 'g2_TagItemMap'.

Problem appears to be g_itemId and g_tagId are both nullable in tags/classes/Maps.xml. Manual alteration of columns in db to "not null" allows installation to continue. Suggest Maps.xml be updated appropriately assuming the change doesn't cause any other problems.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-06-10 16:52
Quote:
The maintainer of the tags module as not been about for some time.

OK, cool - I've got some interesting upgrades to this module too, and not having to keep them private will make things much easier.