Database import tables on every install with "IF NOT EXISTS"

This fixed errors when one table is missing or is duplicated
This commit is contained in:
slawkens
2025-10-25 22:11:33 +02:00
parent 44110a9496
commit bde158e3d7
7 changed files with 145 additions and 55 deletions

View File

@@ -18,7 +18,16 @@ class Changelog extends Model {
public $timestamps = false;
protected $fillable = [
'body', 'type', 'where',
'date', 'player_id', 'hide',
];
public function scopeIsPublic($query) {
$query->where('hide', '!=', 1);
}
public function player() {
return $this->belongsTo(Player::class);
}
}