AUTO_INCREMENT db.xml ?

Permalink
how can i make an AUTO_INCREMENT field using db.xml?

this has not worked:

<field name="eID" type="I">
<key ></key>
<unsigned ></unsigned>
</field>

 
mesuva replied on at Permalink Reply
mesuva
You have to add it in to the field info, try:
<field name="eID" type="I">
<key/>
<unsigned/>
<autoincrement/>
</field>
aryeh replied on at Permalink Reply
when i install the package with the code you gave a get the error:

mysql error: [1075: Incorrect table definition; there can be only one auto column and it must be defined as a key] in EXECUTE("ALTER TABLE 3dgalleryList MODIFY COLUMN eID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT")


any other suggestion?

thank you.
mesuva replied on at Permalink Best Answer Reply
mesuva
From the error message, it sounds like you've already got an auto incrementing field on your database table.

I'd check and/or modify your database table or you could uninstall your package, delete the database table and try installing it again.
aryeh replied on at Permalink Reply
thank you , i deleted the table and it works.