Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant primary keys #76

Closed
AmirHossein opened this issue Dec 21, 2023 · 2 comments · Fixed by #77
Closed

Redundant primary keys #76

AmirHossein opened this issue Dec 21, 2023 · 2 comments · Fixed by #77
Assignees

Comments

@AmirHossein
Copy link
Contributor

I can see that version 1.5.2 generates 2 primary keys for sample migration below:

Schema::create('table_name', function (Blueprint $table) {
    $table->string('name');
    $table->unsignedBigInteger('valu');

    $table->primary('name');
});

Sql is:

create table `table_name` (
    `name` varchar(255) not null,
    `val` bigint unsigned not null,
    primary key `table_name_name_primary`(`name`),
    primary key (`name`)
) default character set utf8mb4 collate 'utf8mb4_unicode_ci'

which throws SQL error like below:
General error: 1851 COLUMNAR indexes and SKIPLIST indexes cannot be used on the same table

I would appreciate it if you could check it.

@AmirHossein
Copy link
Contributor Author

AmirHossein commented Dec 21, 2023

It seems the package misses this update from a recent PR.

@AdalbertMemSQL
Copy link
Collaborator

Hey @AmirHossein
You are right. I'm going to work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants