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

Index column sort order #1661

Closed
JRDuncan opened this issue Dec 17, 2019 · 2 comments · Fixed by #1888
Closed

Index column sort order #1661

JRDuncan opened this issue Dec 17, 2019 · 2 comments · Fixed by #1888

Comments

@JRDuncan
Copy link
Contributor

JRDuncan commented Dec 17, 2019

Phinx does not allow you to specify the sort order on Index columns.

public function change()
{
    $table = $this->table('users');
    $table->addColumn('email', 'string')
          ->addColumn('username','string')
          ->addIndex(['email','username'], ['order' => ['email' => 'DESC', 'username' => 'ASC']])
          ->create();
}
@dereuromark
Copy link
Member

PR welcome

@nohaycubetto
Copy link

Second this.

JRDuncan pushed a commit to JRDuncan/phinx that referenced this issue Sep 28, 2020
dereuromark added a commit that referenced this issue Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants