Skip to content

createdAt field gets overwritten when creating new version #186

Open
@tavsec

Description

@tavsec

Bug report

Describe the bug

When creating new version of versioned model, the createdAt field is also the same as updatedAt date. I think that the createdAt field should also stay the same.

Steps to reproduce the behavior

  1. Create versioned model
  2. Create new entry for this model and save it
  3. Check createdAt date
  4. Update this entry
  5. Check new createdAt date. It is updated, but it shouldn't

Expected behavior

createdAt date should stay the same for all of the versioned (timestamp, when the entry was first created).

System

  • Node.js version: v18
  • NPM version: 9.5
  • Strapi version: v4
  • Database: mysql
  • Operating system: macOS/Ubuntu

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