Skip to content

Non-set keys should not be alteredΒ #1221

@dereuromark

Description

@dereuromark

Moved cakephp/migrations#330 over to here.

Currently

		$table->changeColumn('status', 'string', [
			'encoding' => 'utf8mb4',
			'collation' => 'utf8mb4_unicode_ci',
		]);

Kills most other settings like

			'null' => true,
			'default' => null,

Silently changing the other table field properties here now makes inserts impossible without specifying these now non-null-default values.

One always needs to check and add all those into every changeColumn, instead of just altering what is defined here in the migration file.
This leads to some really dangerous DB regressions.
Maybe we can merge with existing scheme before applying?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions