add another index to SQL Form tables

This commit is contained in:
Graham Knop 2008-02-28 15:39:04 +00:00
parent 44e789544a
commit 8129bef2fb
2 changed files with 27 additions and 2 deletions

View file

@ -1395,6 +1395,7 @@ my $hasPrimaryKey = 0;
}
$dbLink->db->write("alter table $tableName add primary key (__recordId, __revision)");
$dbLink->db->write("alter table $tableName add key recordId_archived (__recordId, __archived)");
}
else {
#new table
@ -1409,7 +1410,8 @@ my $hasPrimaryKey = 0;
" __deletedBy varchar(22),".
" __archived tinyint(1) default 0,".
" __revision int(11) not null,".
" primary key (__recordId, __revision)".
" primary key (__recordId, __revision),".
" key recordId_archived (__recordId, __archived)".
")");
}
}