Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] \Phaclon\Db\Index: TYPE #1989

Closed
lantian opened this issue Feb 7, 2014 · 6 comments
Closed

[NFR] \Phaclon\Db\Index: TYPE #1989

lantian opened this issue Feb 7, 2014 · 6 comments

Comments

@lantian
Copy link
Contributor

lantian commented Feb 7, 2014

[NOW]:
Currently we can create index via db adapter:

$db->addIndex(new Index('name', $columns));

But we can't set index type. Index has only two properties (name and columns) - http://docs.phalconphp.com/en/latest/api/Phalcon_Db_Index.html

[NFR]:
Adding new fields 'type' to improve index:

class Index {

public function __constructor($name, $columns, $type = null){...}
public function getType(){...}

}

This will allow to generate sql:

ALTER TABLE `$table` ADD $type INDEX `$name` (...$columns...);

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ghost
Copy link

ghost commented Feb 9, 2014

Actually I was working on a similar feature but had no time to finish it :-(

@nexik
Copy link

nexik commented Feb 9, 2014

support for example: unique indexes would be awesome

@pgasiorowski
Copy link
Contributor

+1

@TheSerapher
Copy link

👍

@sergeyklay
Copy link
Contributor

@andresgutierrez Issue is solved

@Green-Cat
Copy link
Contributor

@sergeyklay Implemented in #2449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants