feat: delete table breath template
This commit is contained in:
@@ -10,7 +10,17 @@ class BreathingTemplateSeeder extends Seeder
|
|||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
BreathingTemplate::query()->delete();
|
BreathingTemplate::query()->delete();
|
||||||
|
|
||||||
|
// تشخیص نوع دیتابیس
|
||||||
|
$driver = DB::getDriverName();
|
||||||
|
|
||||||
|
if ($driver === 'mysql') {
|
||||||
|
// ریست Auto Increment در MySQL
|
||||||
DB::statement('ALTER TABLE breathing_templates AUTO_INCREMENT = 1');
|
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 = [
|
$templates = [
|
||||||
[
|
[
|
||||||
'name' => '۴-۷-۸ تنفس آرام',
|
'name' => '۴-۷-۸ تنفس آرام',
|
||||||
|
|||||||
Reference in New Issue
Block a user