Skip to content

Commit

Permalink
Merge pull request #543 from cnizzardini/patch-1
Browse files Browse the repository at this point in the history
Documentation: Unique index sample
  • Loading branch information
markstory authored Apr 24, 2022
2 parents 1496678 + def9773 commit b2e52d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,10 @@ will generate::
{
$table = $this->table('products');
$table->addColumn('name', 'string')
->addColumn('email', 'string')
->addIndex(['name'])
// add a unique index:
->addIndex('email', ['unique' => true])
->update();
}
}
Expand Down

0 comments on commit b2e52d4

Please sign in to comment.