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.
In Pgsql, column data type change from varchar(255) to json "using" should be used #125
Description
In Pgsql, if we change db type from varchar(255) to json, alter column statement should have "using".
Example:
From:
name:
type: string
x-db-type: varchar(255)
To:
name:
type: array
x-db-type: JSON
nullable: false
default: '{}'
This should not be generated in migration:
$this->db->createCommand('ALTER TABLE {{%fruits}} ALTER COLUMN name SET DATA TYPE json')->execute();
But this should be generated:
$this->db->createCommand('ALTER TABLE {{%fruits}} ALTER COLUMN name SET DATA TYPE json using "name"::json')->execute();
PR will be SOHELAHMED7#7
Metadata
Metadata
Assignees
Labels
No labels