Skip to content

Support an updateOrCreate() method for Entry and Term repositories #1382

@aaronbushnell

Description

@aaronbushnell

The work from statamic/cms#9815 is a great idea from @godismyjudge95, however, Jason noted there's some complexity to implement these methods into Statamic as-is. Totally understandable, so I wanted to create a formal post here to document this feature request.

We've been working with a number of clients and migrating their content to a new Statamic build. Part of that usually involves creating some quick commands to import their content into the CMS. Because the build can take a bit of time, we find our imports are rarely one-and-done. Having an updateOrCreate() would allow us to easily:

  1. Update existing entries that have been imported
  2. Create new entries that have not yet been imported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions