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

Migration fails with too-long index name #46

Description

@vvval
    public function up(): void
    {
        $this->table('long_table_name')
            ->addForeignKey(
                ['column'],
                'foreign_table',
                ['id'],
                ['name'   => 'long_table_name_column_hash', /* etc */]
            )
    }

[Spiral\Migrations\Exception\MigrationException]
Error in the migration (migration name) occurred: SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name 'long_table_name_column_hash' is too long in /var/www/vendor/spiral/migrations/src/Migrator.php:173

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions