Skip to main content

Module schema

Module schema 

Source
Expand description

Migration helpers for polymorphic columns.

Enums§

KeyType
The type of the *_id column, matching the owners’ primary keys.

Functions§

morph_columns
The {name}_type and {name}_id columns, NOT NULL.
morph_index
The index on ({name}_type, {name}_id) that every polymorphic lookup uses, named {table}_{name}_type_{name}_id_index.
nullable_morph_columns
The same columns, nullable, for an optional owner.