Skip to content

Create() uses different timestamps for default created and updated times #624

@mpontillo

Description

@mpontillo

Description

When inserting a large number of records, I expected that the created_at and updated_at fields would always be the same. (I wanted to be able to tell whether or not a record has been updated by checking for equality between created_at and updated_at.)

Steps to Reproduce the Problem

Insert a large number of records using Create() and its default values for created_at and updated_at.

Expected Behavior

All records should have the same timestamp.

Actual Behavior

Some records have different timestamps.

When using MySQL DDL such as the following to increase the precision, every timestamp is slightly different:

`created_at` timestamp(6) NOT NULL

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