Skip to content

Commit

Permalink
Drop updated_at column on inscriptions table
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnbrk committed Jan 5, 2025
1 parent b9738db commit 2de123a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Models/Inscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class Inscription extends Model
{
use HasBtcLoongArt, HasFactory, HasJasmineArt, HasMcaChefArt, HasMoodzAnimations, HasSEO;

const UPDATED_AT = null;

protected $fillable = [
'inscription_id',
'name',
Expand Down
1 change: 0 additions & 1 deletion database/factories/InscriptionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public function definition(): array
'name' => 'Pizza Ninjas #1',
'inscription_id' => '9ad43b591e58b23d8550dfdae431432b6ea3a7079d09ef80ee1554c5a3f8d543i0',
'created_at' => now(),
'updated_at' => now(),
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::table('inscriptions', function (Blueprint $table) {
$table->dropColumn('updated_at');
});
}

public function down(): void
{
Schema::table('inscriptions', function (Blueprint $table) {
$table->timestamp('updated_at')->nullable()->useCurrent();
});
}
};

0 comments on commit 2de123a

Please sign in to comment.