IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9178


Ignore:
Timestamp:
Oct 3, 2006, 5:11:52 PM (20 years ago)
Author:
jhoblitt
Message:

in psDBGenerateCreateTableSQL() fix "Primary Keys" being duplicated a regular "keys"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r9030 r9178  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-09-28 23:21:33 $
     14 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-10-04 03:11:52 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    13161316    // look for regular keys
    13171317    while ((item = psListGetAndIncrement(cursor))) {
    1318         if (strstr(item->comment, "Key")) {
     1318        // it's just a regular key if it matchs "Key" but not "Primary Key"
     1319        if (strstr(item->comment, "Key")
     1320                && (!strstr(item->comment, "Primary Key"))) {
    13191321            psStringAppend(&query, ", KEY(%s)", item->name);
    13201322        } else if (strstr(item->comment, "AUTO_INCREMENT")) {
Note: See TracChangeset for help on using the changeset viewer.