how can i create an initial version for an already existing model entry?

Open
#99 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
laravel, php
Domain
backend, database

Research direction

The issue names no implementation file or test. Start by locating the package entry point for model version creation and inspect how versions are produced during updates. Done means existing model values can be recorded as an initial version without updating the model, with tests covering that behavior.

Written by the indexing model from the issue text.

Description

enhancement

The package only creates a version on update, and that version is equal to the current values in the database.

How can I create a version without updating so that if I'm adding this package to an already existing application, I can keep the current entries as versions?

Something like $model->createCurrentVersion().

Dominant language
PHP
Stars
787
Forks
99
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mpociot/versionable

All issues in mpociot/versionable

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.