@@ -14,16 +14,12 @@ class UpdateColumnsToTextType extends Migration
1414 public function up ()
1515 {
1616 Schema::table ('users ' , function (Blueprint $ table ) {
17- $ table ->text ('littlelink_description ' )->nullable ()-> change ();
17+ $ table ->text ('littlelink_description ' )->change ();
1818 });
19-
19+
2020 Schema::table ('links ' , function (Blueprint $ table ) {
21- $ table ->text ('title ' )->nullable ()-> change ();
21+ $ table ->text ('title ' )->change ();
2222 });
23-
24- // Set the new character limit to 1000 for both columns
25- DB ::statement ('ALTER TABLE users MODIFY COLUMN littlelink_description TEXT(1000) ' );
26- DB ::statement ('ALTER TABLE links MODIFY COLUMN title TEXT(1000) ' );
2723 }
2824
2925 /**
@@ -34,15 +30,11 @@ public function up()
3430 public function down ()
3531 {
3632 Schema::table ('users ' , function (Blueprint $ table ) {
37- $ table ->string ('littlelink_description ' , 255 )->nullable ()-> change ();
33+ $ table ->string ('littlelink_description ' , 255 )->change ();
3834 });
3935
4036 Schema::table ('links ' , function (Blueprint $ table ) {
41- $ table ->string ('title ' , 255 )->nullable ()-> change ();
37+ $ table ->string ('title ' , 255 )->change ();
4238 });
43-
44- // Revert the character limit to 255 for both columns
45- DB ::statement ('ALTER TABLE users MODIFY COLUMN littlelink_description VARCHAR(255) ' );
46- DB ::statement ('ALTER TABLE links MODIFY COLUMN title VARCHAR(255) ' );
4739 }
4840}
0 commit comments