Skip to content

Model with existing record but no version does not create a version on save() #94

Description

@JurjenRoels

Hi,

I have a database with existing records and we add the VersionableTrait.

I would expect to get a version if we save an existing record?

However I get this with tinker:

$z->versions
=> Illuminate\Database\Eloquent\Collection {#4160
all: [],
}

$z->save()
=> true

$z->versions
=> Illuminate\Database\Eloquent\Collection {#4160
all: [],
}

DD of relevant information on record:

+exists: true
+wasRecentlyCreated: false
-updating: true
-versionableDirtyData: []
-reason: null
#versioningEnabled: true

How can I create a version on this record

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions