Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorsuthern
    • CommentTimeMar 7th 2008 edited
     

    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?

    • CommentAuthorKaste
    • CommentTimeMar 7th 2008
     

    the type Index is the default type. so

    ->addIndex('Post','title');
    

    will do it.

    only UNIQUE|FULLTEXT|HASH must be set explicitly.

    • CommentAuthorKaste
    • CommentTimeMar 7th 2008
     

    The "point" points to the whole directory in

    svn di -r head . > AkInstaller.php.diff
    

    try

    svn help diff
    
    • CommentAuthorsuthern
    • CommentTimeMar 9th 2008
     

    Ahhh, ok. Thanks for the tip on svn too.

Add your comments
    Username Password
  • Format comments as