feat: increase char limit for name fields (#1391)

This commit is contained in:
Phan An 2021-12-06 18:06:55 +01:00 committed by GitHub
parent aedff9cf6e
commit ed92eb2fde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class IncreaseStringColumnsLength extends Migration
{
public function up(): void
{
Schema::table('artists', static function (Blueprint $table): void {
$table->string('name', pow(2, 16) - 32)->change();
});
Schema::table('albums', static function (Blueprint $table): void {
$table->string('name', pow(2, 16) - 32)->change();
});
Schema::table('playlists', static function (Blueprint $table): void {
$table->string('name', pow(2, 16) - 32)->change();
});
Schema::table('songs', static function (Blueprint $table): void {
$table->string('title', pow(2, 16) - 32)->change();
});
}
}