From 6b1a15598f1a479b207e80b7bc1436683bcdb5b4 Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Thu, 9 Mar 2023 13:25:57 +0100 Subject: [PATCH] Revert "Update 2023_03_09_121613_update_columns_to_text_type.php" This reverts commit 597bd20334ed3fa84d38f732f3acd48bbe8c8f73. --- ...3_09_121613_update_columns_to_text_type.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/database/migrations/2023_03_09_121613_update_columns_to_text_type.php b/database/migrations/2023_03_09_121613_update_columns_to_text_type.php index cfb7425..5637679 100644 --- a/database/migrations/2023_03_09_121613_update_columns_to_text_type.php +++ b/database/migrations/2023_03_09_121613_update_columns_to_text_type.php @@ -14,16 +14,12 @@ class UpdateColumnsToTextType extends Migration public function up() { Schema::table('users', function (Blueprint $table) { - $table->text('littlelink_description')->nullable()->change(); + $table->text('littlelink_description')->change(); }); - + Schema::table('links', function (Blueprint $table) { - $table->text('title')->nullable()->change(); + $table->text('title')->change(); }); - - // Set the new character limit to 1000 for both columns - DB::statement('ALTER TABLE users MODIFY COLUMN littlelink_description TEXT(1000)'); - DB::statement('ALTER TABLE links MODIFY COLUMN title TEXT(1000)'); } /** @@ -34,15 +30,11 @@ class UpdateColumnsToTextType extends Migration public function down() { Schema::table('users', function (Blueprint $table) { - $table->string('littlelink_description', 255)->nullable()->change(); + $table->string('littlelink_description', 255)->change(); }); Schema::table('links', function (Blueprint $table) { - $table->string('title', 255)->nullable()->change(); + $table->string('title', 255)->change(); }); - - // Revert the character limit to 255 for both columns - DB::statement('ALTER TABLE users MODIFY COLUMN littlelink_description VARCHAR(255)'); - DB::statement('ALTER TABLE links MODIFY COLUMN title VARCHAR(255)'); } }