Ecto v3.1.7 Ecto.Schema.Metadata View Source
Stores metadata of a struct.
The state of the schema is stored in the
:state field and allows
:built- the struct was constructed in memory and is not persisted to database yet;
:loaded- the struct was loaded from database and represents persisted data;
:deleted- the struct was deleted and no longer represents persisted data.
:source tracks the (table or collection) where the struct is or should
be persisted to.
Tracks the source prefix in the data storage.
:context field represents additional state some databases require
for proper updates of data. It is not used by the built-in adapters of
:schema field refers the module name for the schema this metadata belongs to.