diff --git a/Blacklight/Contents.php b/Blacklight/Contents.php index 153ebb1ca..355df5328 100755 --- a/Blacklight/Contents.php +++ b/Blacklight/Contents.php @@ -169,6 +169,7 @@ class Contents 'contenttype' => $content['contenttype'], 'status' => $content['status'], 'ordinal' => $content['ordinal'], + 'updated_at' => now(), ] ); } @@ -187,6 +188,8 @@ class Contents 'contenttype' => $content['contenttype'], 'status' => $content['status'], 'ordinal' => $content['ordinal'], + 'created_at' => now(), + 'updated_at' => now(), ] ); } diff --git a/database/migrations/2025_04_10_202844_add_created_at_updated_at_columns.php b/database/migrations/2025_04_10_202844_add_created_at_updated_at_columns.php new file mode 100644 index 000000000..38fc2dbb4 --- /dev/null +++ b/database/migrations/2025_04_10_202844_add_created_at_updated_at_columns.php @@ -0,0 +1,28 @@ +timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('content', function (Blueprint $table) { + $table->dropTimestamps(); + }); + } +};