Increase article title and URL column length in migration.

- Increase character lengths for `titleurl` and `url` columns in `articles` table
- Add migration file to alter column lengths in database
This commit is contained in:
Jonny Barnes 2023-05-19 14:15:18 +01:00
parent 0700fb0cd2
commit e1731d2ed3
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8

View file

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('articles', function (Blueprint $table) {
$table->string('titleurl', 255)->change();
$table->string('url', 255)->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('articles', function (Blueprint $table) {
// Converting back to shorter lengths might cause issues
});
}
};