@@ -363,10 +363,10 @@ model. In this method, you can specify the changes to make to an older
363
363
model to update it to match the current schema version.
364
364
365
365
When you save a model that does not have a schema version
366
- specified, Laravel assumes that it follows the latest schema version.
367
- When you retrieve a model that does not contain the ``schema_version``
368
- field, Laravel assumes that its schema version is ``0`` and performs the
369
- migration.
366
+ specified, the ``HasSchemaVersion`` trait assumes that it follows the
367
+ latest schema version. When you retrieve a model that does not contain
368
+ the ``schema_version`` field, the trait assumes that its schema version
369
+ is ``0`` and performs the migration.
370
370
371
371
Schema Versioning Example
372
372
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -395,11 +395,11 @@ You can define the new model class with the following behavior:
395
395
396
396
In the ``"WASP-39 b"`` document in the following code, the
397
397
``schema_version`` field value is less than ``2``. When you retrieve the
398
- document, Laravel adds the ``galaxy`` field and updates the schema
398
+ document, {+odm-short+} adds the ``galaxy`` field and updates the schema
399
399
version to the current version, ``2``.
400
400
401
401
The ``"Saturn"`` document does not contain the ``schema_version`` field,
402
- so Laravel assigns it the current schema version upon saving.
402
+ so {+odm-short+} assigns it the current schema version upon saving.
403
403
404
404
Finally, the code retrieves the models from the collection to
405
405
demonstrate the changes:
0 commit comments