Skip to content

Use default collation #278

Description

@dereuromark

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 3.4 dev (dev-3.next)

  • Migrations plugin version: dev-master

  • Database server (MySQL, SQLite, Postgres): MySQL 5.6

  • PHP Version: 5.6

What you did

utf8mb4_unicode_ci is the default database collation.
I have a migration file including new tables with a normal setup:

        $this->table('countries')
            ->addColumn('name', 'string', [
                'default' => null,
                'limit' => 40,
                'null' => false,
            ])
            ...
            ->create();

The datasources connection is also set up as

'encoding' => 'utf8mb4',

What happened

It generated tables with "utf8_general_ci".

Expected Behavior

It should have used the connection/database default "utf8mb4_unicode_ci".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions