Skip to content

Commit ffc49a4

Browse files
authored
Change order of actions in migration upgrade guide
1 parent ebaa0a8 commit ffc49a4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/upgrade/3.x_to_4.x.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ private const TABLES = [
4444
public function up(): void
4545
{
4646
foreach (self::TABLES as $tableName => $columns) {
47+
Schema::table($tableName, function (Blueprint $table) use ($columns) {
48+
foreach ($columns as $column) {
49+
$table->bigInteger($column)->default(0)->change();
50+
}
51+
});
52+
4753
$lackingDecimalPlaces = 4 - self::DECIMALS;
4854
if ($lackingDecimalPlaces > 0) {
4955
$multiplier = 10 ** $lackingDecimalPlaces;
@@ -56,12 +62,6 @@ public function up(): void
5662
->toArray()
5763
);
5864
}
59-
60-
Schema::table($tableName, function (Blueprint $table) use ($columns) {
61-
foreach ($columns as $column) {
62-
$table->bigInteger($column)->default(0)->change();
63-
}
64-
});
6565
}
6666
}
6767
```

0 commit comments

Comments
 (0)