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

Remove doctrine/dbal and fix migration improper column types #10454

Merged
merged 11 commits into from
Aug 16, 2023
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"require": {
"anhskohbo/no-captcha": "^3.2",
"chaseconey/laravel-datadog-helper": ">=1.2.0",
"doctrine/dbal": "^3.1",
"egulias/email-validator": "*",
"elasticsearch/elasticsearch": "^7.12.0",
"ezyang/htmlpurifier": "*",
Expand Down
345 changes: 1 addition & 344 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public function up()
$table->string('image', 50)->nullable()->change();
});

// DBAL, which is used to execute `change()`, doesn't support `mediumInteger`.
DB::statement('ALTER TABLE osu_achievements MODIFY achievement_id MEDIUMINT UNSIGNED NOT NULL');
Schema::table('osu_achievements', function ($table) {
$table->mediumInteger('achievement_id')->unsigned()->change();
});
}

/**
Expand All @@ -47,7 +48,8 @@ public function down()
$table->string('image', 50)->change();
});

// `mediumIncrements` requires unsupported `mediumInteger`.
// Laravel mediumIncrements() always specifies primary key, causing conflicts.

DB::statement('ALTER TABLE osu_achievements MODIFY achievement_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class NullableEntryUrlOnContestEntries extends Migration
public function up()
{
Schema::table('contest_entries', function (Blueprint $table) {
$table->string('entry_url')->nullable()->default('NULL')->change();
$table->string('entry_url')->nullable()->change();
});
}

Expand Down
Loading