1 to 4 of 4
I'm thinking of adding this patch into TRAC. I'm sure someone had reason not to include 'INDEX' as a type of allowable index to use when doing AkInstaller::createIndex, but I find it kind of limiting. Why shouldn't I be able to add an 'INDEX' index type manually? If no one replies, I'll put it up on TRAC.
Index: AkInstaller.php
===================================================================
--- AkInstaller.php (revision 505)
+++ AkInstaller.php (working copy)
@@ -358,12 +328,12 @@
}
}
}
-
+
function addIndex($table_name, $columns, $index_name = '')
{
$index_name = ($index_name == '') ? 'idx_'.$table_name.'_'.$columns : $index_name;
$index_options = array();
- if(preg_match('/(UNIQUE|FULLTEXT|HASH)/',$columns,$match)){
+ if(preg_match('/(UNIQUE|FULLTEXT|HASH|INDEX)/',$columns,$match)){
$columns = trim(str_replace($match[1],'',$columns),' ');
$index_options[] = $match[1];
}
On a side note, how can I run svn di -r head . > AkInstaller.php.diff
on JUST one file, not the whole directory? Is it possible?
the type Index is the default type. so
->addIndex('Post','title');
will do it.
only UNIQUE|FULLTEXT|HASH must be set explicitly.
The "point" points to the whole directory in
svn di -r head . > AkInstaller.php.diff
try
svn help diff
Ahhh, ok. Thanks for the tip on svn too.
1 to 4 of 4