protected void writeExternalPrimaryKeysCreateStmt(Table table,Column[] primaryKeyColumns,StringBuilder ddl){
  if ((primaryKeyColumns.length > 0) && shouldGeneratePrimaryKeys(primaryKeyColumns)) {
    ddl.append("ALTER TABLE ");
    ddl.append(getFullyQualifiedTableNameShorten(table));
    println(ddl);
    printIndent(ddl);
    ddl.append("ADD CONSTRAINT ");
    printIdentifier(getConstraintName(null,table,"PK",null),ddl);
    ddl.append(" ");
    writePrimaryKeyStmt(table,primaryKeyColumns,ddl);
    printEndOfStatement(ddl);
  }
}

protected void writeExternalPrimaryKeysCreateStmt ( Table table , Column [ ] primaryKeyColumns , StringBuilder ddl ) { if ( ( primaryKeyColumns . length > 0 ) && shouldGeneratePrimaryKeys ( primaryKeyColumns ) ) { ddl . append ( "ALTER TABLE " ) ; ddl . append ( getFullyQualifiedTableNameShorten ( table ) ) ; println ( ddl ) ; printIndent ( ddl ) ; ddl . append ( "ADD CONSTRAINT " ) ; printIdentifier ( getConstraintName ( null , table , "PK" , null ) , ddl ) ; ddl . append ( " " ) ; writePrimaryKeyStmt ( table , primaryKeyColumns , ddl ) ; printEndOfStatement ( ddl ) ; } }
writes the primary key constraints of the table as alter table statements .
