You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Now if I add 3 new fields : message5, message6, message7 after message4 then alter column statement for message{1-4} fields is generated in migrations which should not be generated
publicfunctionup()
{
$this->addColumn('{{%table}}', 'message4', 'json NOT NULL AFTER message4');
$this->addColumn('{{%table}}', 'message5', 'json NOT NULL');
$this->addColumn('{{%table}}', 'message6', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message2', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message3', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message1', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message4', 'json NOT NULL');
}
publicfunctiondown()
{
$this->alterColumn('{{%table}}', 'message4', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message1', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message3', 'json NOT NULL');
$this->alterColumn('{{%table}}', 'message2', 'json NOT NULL');
$this->dropColumn('{{%table}}', 'message6');
$this->dropColumn('{{%table}}', 'message5');
$this->dropColumn('{{%table}}', 'message4');
}
TODO:
check for default values in json e.g. '{}' and [ ]
add tests for x-db-type (for json): fresh, secondary with new col; secondary with edit col
The text was updated successfully, but these errors were encountered:
Lets say I have json fields
example:
Now if I add 3 new fields : message5, message6, message7 after message4 then alter column statement for message{1-4} fields is generated in migrations which should not be generated
TODO:
'{}'
and[ ]
The text was updated successfully, but these errors were encountered: