mirror of
https://github.com/knex/knex.git
synced 2025-11-03 03:09:42 +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>
|
||||
<br />
|
||||
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 id="Chainable-unique">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user