Skip to content

Inconsistent behavior of datetime/timestamp in v2 #1168

@batyrmastyr

Description

@batyrmastyr

Description

Columns created as $columnBuilderClass::timestamp(6) are parsed back as

  • ColumnType::TIMESTAMP - in MySQL, SQLite.
  • ColumnType::DATETIME — in MSSQL, PostgreSQL, Oracle

Also, it seems a bit strange that default for timestamp/datetime is 0, not null reducing precision to 1 second instead of max supported.

    public static function timestamp(?int $size = 0): ColumnInterface
    public static function datetime(?int $size = 0): ColumnInterface

Package version

2.0

PHP version

8.4

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions