Only auto-increment the ID for the base class

Don't add an AUTOINCREMENT clause to the PRIMARY KEY, ID column if it we're not working on the abstract base class.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5364 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-03 19:04:10 +00:00
parent 0814e56caa
commit fc1f447adf
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ sub printStruct
elsif (/abstract/)
{
print "\t-- Automatically generated ID to link the inheritance hierarchy.\n"
."\tunique_inheritance_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n\n";
."\tunique_inheritance_id INTEGER PRIMARY KEY ";
print "AUTOINCREMENT " if $printFields;
print "NOT NULL,\n\n";
}
}