mirror of
https://github.com/knex/knex.git
synced 2025-11-16 01:55:11 +00:00
Merge pull request #143 from p-baleine/topic-primarykey-docs-update
Added docs for compound primary key
This commit is contained in:
commit
c43e0d76d8
@ -1292,6 +1292,7 @@ knex.schema.table('users', function (table) {
|
|||||||
<b class="header">primary</b><code>column.primary()</code>
|
<b class="header">primary</b><code>column.primary()</code>
|
||||||
<br />
|
<br />
|
||||||
Sets the field as the primary key for the table.
|
Sets the field as the primary key for the table.
|
||||||
|
To create a compound primary key, pass an array of column names: <code>table.primary(['column1', 'column2'])</code>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p id="Chainable-unique">
|
<p id="Chainable-unique">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user