Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

If data type is not changed then still migrations are generated for timestamp in MySQL #143

Closed
SOHELAHMED7/yii2-openapi
#24
@SOHELAHMED7

Description

@SOHELAHMED7

DB: MySQL

OpenAPI schema:

# User:
title: User
x-table: user
type: object
description: Database schema of a User.

# ...

properties:

  id:
    type: integer
    readOnly: true
    example: 1337


  # other fields...

  created_at:
    type: string
    format: date-time
    example: '2020-03-14T21:42:17Z'
    readOnly: true

  updated_at:
    type: string
    format: date-time
    example: '2020-03-14T21:42:17Z'
    readOnly: true


Generated migrations :

unwanted-migrations

Expected:

This migrations does not make any sense and should not be generated

Hint for solution: This happens because we haven't explicitly mentioned x-db-type, so by default it is considered timestamp data type

Type: Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions