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

Foreign key in achievement_progress table has incorrect column type #18

Closed
mstralka opened this issue Jul 25, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@mstralka
Copy link

In a MySQL database, the id field type in the achievement_details table is UNSIGNED BIG INT because the $table->id(); command generates an unsigned big int field.

// This generates an UNSIGNED BIG INT column.
$table->id();

In the achievement_progress table, the achievement_id field is created as:

$table->unsignedInteger('achievement_id');

That causes a mismatch and MySQL won't create the foreign key.

It should be:

$table->unsignedBigInteger('achievement_id');
mstralka added a commit to mobilelocker/laravel-achievements that referenced this issue Jul 25, 2022
…, matching the ID column in the achievement_details table.
@assada assada added the bug Something isn't working label Sep 6, 2022
@assada
Copy link
Owner

assada commented Sep 6, 2022

Thx, @mstralka for reporting, and @ahmdalgendi for PR!

@assada assada closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants