Skip to content

Commit 5fee6fd

Browse files
committed
Update timestamp column names
At some point migrations changed from 'modified' to using 'updated' which isn't the same default value as timestamp behavior.
1 parent baf882a commit 5fee6fd

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

config/Migrations/20210123053705_Initial.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function up()
172172
->addColumn('child_order', 'integer', [
173173
'default' => '0',
174174
'limit' => null,
175-
'null' => false,
175+
'null' => true,
176176
])
177177
->addColumn('day_order', 'integer', [
178178
'default' => '0',

config/Migrations/20240826035425_AddFeedModels.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function change(): void
2929
'default' => null,
3030
'null' => true,
3131
])
32-
->addTimestamps();
32+
->addTimestamps('created', 'modified');
3333
$table->create();
3434

3535
// Items in each feed - shared by all users
@@ -47,7 +47,7 @@ public function change(): void
4747
'null' => false,
4848
])
4949
->addColumn('thumbnail_image_url', 'string', ['null' => true])
50-
->addTimestamps();
50+
->addTimestamps('created', 'modified');
5151

5252
$table->addForeignKey(['feed_id'], 'feeds');
5353
$table->create();
@@ -68,7 +68,7 @@ public function change(): void
6868
'null' => false,
6969
'default' => 0,
7070
])
71-
->addTimestamps();
71+
->addTimestamps('created', 'modified');
7272
$table->addForeignKey(['user_id'], 'users');
7373
$table->create();
7474

@@ -89,7 +89,7 @@ public function change(): void
8989
->addColumn('ranking', 'integer', [
9090
'null' => false,
9191
])
92-
->addTimestamps();
92+
->addTimestamps('created', 'modified');
9393
$table->addForeignKey(['feed_id'], 'feeds');
9494
$table->addForeignKey(['feed_category_id'], 'feed_categories');
9595
$table->addForeignKey(['user_id'], 'users');
@@ -115,7 +115,7 @@ public function change(): void
115115
'null' => false,
116116
'default' => false,
117117
])
118-
->addTimestamps();
118+
->addTimestamps('created', 'modified');
119119
$table->addForeignKey(['feed_subscription_id'], 'feed_subscriptions');
120120
$table->addForeignKey(['feed_item_id'], 'feed_items');
121121
$table->create();
@@ -127,7 +127,7 @@ public function change(): void
127127
])
128128
->addColumn('title', 'string')
129129
->addColumn('body', 'text')
130-
->addTimestamps();
130+
->addTimestamps('created', 'modified');
131131
$table->addForeignKey(['feed_subscription_id'], 'feed_subscriptions');
132132
$table->create();
133133
}

0 commit comments

Comments
 (0)