Skip to content

Commit f404e1c

Browse files
committed
no-mistakes(document): docs: note FK-index option in conventions table
1 parent 1cc17ac commit f404e1c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/features/migrations-and-drift.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ come from the project's **schema conventions**, selected in `.metaobjects/config
496496
|---|---|---|
497497
| Primary-key constraint name (Postgres; SQLite and D1 emit an unnamed primary key) | `<table>_pkey` | `PK_<table>` |
498498
| Foreign-key constraint name | `<table>_<first column>_fk` | `FK_<table>_<principal>_<columns>` |
499-
| Index on a foreign key | none | `IX_<table>_<columns>`, unless the primary key or another index (a partial one included) already starts with the FK's columns; an FK index another FK index covers is dropped, so FK order does not matter |
499+
| Index on a foreign key | none (unless [`migrate.foreignKeyIndexes`](#foreign-key-indexes-migrateforeignkeyindexes) is on, which gives each uncovered one `<table>_<columns>_idx`) | `IX_<table>_<columns>`, unless the primary key or another index (a partial one included) already starts with the FK's columns; an FK index another FK index covers is dropped, so FK order does not matter |
500500
| Unique key (`identity.secondary`, a `@unique` field) | a unique index; a live UNIQUE constraint is also accepted | a UNIQUE constraint when a foreign key references it, else a unique index |
501501

502502
`efcore` is a reference preset. It reproduces one ORM's documented naming to show what the

0 commit comments

Comments
 (0)