Skip to content

Commit 5e8981a

Browse files
committed
Sub_part
Sub_part
1 parent 9910e9c commit 5e8981a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ganeshkandu/kdbv",
3-
"description": "database versioning tool",
4-
"keywords": ["php","mysql","maria","versioning","upgrade","update","composer"],
3+
"description": "database auto upgrade tool",
4+
"keywords": ["composer","mysql","php","mysql-database","update","upgrade","upgrade-tool","database-migrations","versioning","version-control","version-changer","latest-version","mariadb","automation","autodeploy","schema","database","data","packagist"],
55
"type": "library",
66
"license": "GPL-3.0",
77
"authors": [

src/table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,12 @@ function addKeys(){
477477
$sub_part = array();
478478
foreach($index['index'] as $key){
479479
$index_temp[$key['NAME']][] = $key['COLUMN'];
480-
$sub_part[] = empty($key['Sub_part'])?'':"({$key['Sub_part']})";
480+
$sub_part[$key['NAME']][] = empty($key['Sub_part'])?'':"({$key['Sub_part']})";
481481
}
482482
foreach($index_temp as $name => $_keys){
483483
$_indexs = array();
484484
foreach($this->tilde($_keys) as $no => $val){
485-
$_indexs[] = "$val{$sub_part[$no]}";
485+
$_indexs[] = "$val{$sub_part[$name][$no]}";
486486
}
487487
$_key = '';
488488
if($key['Index_type'] != 'BTREE'){
@@ -497,12 +497,12 @@ function addKeys(){
497497
$sub_part = array();
498498
foreach($index['unique'] as $key){
499499
$index_temp[$key['NAME']][] = $key['COLUMN'];
500-
$sub_part[] = empty($key['Sub_part'])?'':"({$key['Sub_part']})";
500+
$sub_part[$key['NAME']][] = empty($key['Sub_part'])?'':"({$key['Sub_part']})";
501501
}
502502
foreach($index_temp as $name => $_keys){
503503
$_indexs = array();
504504
foreach($this->tilde($_keys) as $no => $val){
505-
$_indexs[] = "$val{$sub_part[$no]}";
505+
$_indexs[] = "$val{$sub_part[$name][$no]}";
506506
}
507507
$_temp[] = "\nADD UNIQUE KEY `{$name}` (".implode(",",$_indexs).")";
508508
}

0 commit comments

Comments
 (0)