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:
parent
0700fb0cd2
commit
e1731d2ed3
1 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue