Skip to content

Commit 3ebd006

Browse files
committed
Remove timestamps from cocktail subs
1 parent 7946dcf commit 3ebd006

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

app/Models/CocktailIngredientSubstitute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class CocktailIngredientSubstitute extends Model
1515
/** @use \Illuminate\Database\Eloquent\Factories\HasFactory<\Database\Factories\CocktailIngredientSubstituteFactory> */
1616
use HasFactory;
1717

18+
public $timestamps = false;
19+
1820
protected $casts = [
1921
'amount' => 'float',
2022
'amount_max' => 'float',
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('cocktail_ingredient_substitutes', function (Blueprint $table) {
15+
$table->dropColumn('created_at');
16+
$table->dropColumn('updated_at');
17+
});
18+
}
19+
20+
/**
21+
* Reverse the migrations.
22+
*/
23+
public function down(): void
24+
{
25+
Schema::table('cocktail_ingredient_substitutes', function (Blueprint $table) {
26+
$table->timestamps();
27+
});
28+
}
29+
};

0 commit comments

Comments
 (0)