File tree Expand file tree Collapse file tree
app/sprinkles/account/src/Database/Migrations/v430 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class UpdateUsersTable extends Migration
2626 * {@inheritdoc}
2727 */
2828 public static $ dependencies = [
29+ '\UserFrosting\Sprinkle\Account\Database\Migrations\v400\GroupsTable ' ,
2930 '\UserFrosting\Sprinkle\Account\Database\Migrations\v400\UsersTable ' ,
3031 '\UserFrosting\Sprinkle\Account\Database\Migrations\v420\AddingForeignKeys '
3132 ];
@@ -38,7 +39,7 @@ public function up()
3839 if ($ this ->schema ->hasTable ('users ' )) {
3940 $ this ->schema ->table ('users ' , function (Blueprint $ table ) {
4041 $ table ->dropForeign ('users_group_id_foreign ' );
41- $ table ->integer ('group_id ' )-> unsigned ( )->default (null )->comment ('The id of the user group. ' )->nullable ()->change ();
42+ $ table ->unsignedInteger ('group_id ' )->default (null )->comment ('The id of the user group. ' )->nullable ()->change ();
4243 $ table ->foreign ('group_id ' )->references ('id ' )->on ('groups ' );
4344 });
4445 }
@@ -51,7 +52,7 @@ public function down()
5152 {
5253 $ this ->schema ->table ('users ' , function (Blueprint $ table ) {
5354 $ table ->dropForeign ('users_group_id_foreign ' );
54- $ table ->integer ('group_id ' )-> unsigned ( )->default (1 )->comment ('The id of the user group. ' )->nullable (false )->change ();
55+ $ table ->unsignedInteger ('group_id ' )->default (1 )->comment ('The id of the user group. ' )->nullable (false )->change ();
5556 $ table ->foreign ('group_id ' )->references ('id ' )->on ('groups ' );
5657 });
5758 }
You can’t perform that action at this time.
0 commit comments