Skip to content

Commit d207ca2

Browse files
committed
Change column type to
1 parent c08cf38 commit d207ca2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/sprinkles/account/src/Database/Migrations/v430/UpdateUsersTable.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)