This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-08-08 09:53:00 -04:00
parent 33bb062fe7
commit 45c1ceffcc
19 changed files with 128 additions and 40 deletions

View File

@@ -207,12 +207,16 @@ class database extends database_base
}
}
if (isset( $aParameters['AutoIncrement'] ) && $aParameters['AutoIncrement']) {
$sSQL .= ' AUTO_INCREMENT PRIMARY KEY';
$sSQL .= ' AUTO_INCREMENT';
}
/*if ($aParameters['Key'] == 'PRI') {
$sKeys .= 'ALTER TABLE ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter .
' ADD PRIMARY KEY (' . $this->sQuoteCharacter . $sColumn . $this->sQuoteCharacter . ')' . $this->sEndLine;
}*/
if (isset( $aParameters['PrimaryKey'] ) && $aParameters['PrimaryKey']) {
$sSQL .= ' PRIMARY KEY';
}
if (isset( $aParameters['Unique'] ) && $aParameters['Unique']) {
$sSQL .= ' UNIQUE';
}
//we need to check the property AI
if (isset( $aParameters['AI'] )) {
if ($aParameters['AI'] == 1) {
$sSQL .= ' AUTO_INCREMENT';