fix: edit exerice template
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
class BreathingTemplate extends Model
|
||||
{
|
||||
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'repeat'];
|
||||
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'breath_hold' , 'duration'];
|
||||
|
||||
public function user()
|
||||
{
|
||||
|
||||
@@ -11,14 +11,11 @@ public function run(): void
|
||||
{
|
||||
BreathingTemplate::query()->delete();
|
||||
|
||||
// تشخیص نوع دیتابیس
|
||||
$driver = DB::getDriverName();
|
||||
|
||||
if ($driver === 'mysql') {
|
||||
// ریست Auto Increment در MySQL
|
||||
DB::statement('ALTER TABLE breathing_templates AUTO_INCREMENT = 1');
|
||||
} elseif ($driver === 'pgsql') {
|
||||
// ریست Sequence در PostgreSQL
|
||||
DB::statement('ALTER SEQUENCE breathing_templates_id_seq RESTART WITH 1');
|
||||
}
|
||||
$templates = [
|
||||
|
||||
Reference in New Issue
Block a user