소스 검색

邮件测试迁移删除

ANG YU 5 년 전
부모
커밋
e1b3c6dca0
1개의 변경된 파일0개의 추가작업 그리고 36개의 파일을 삭제
  1. 0 36
      database/migrations/2021_01_08_112003_add_default_mail_event_role.php

+ 0 - 36
database/migrations/2021_01_08_112003_add_default_mail_event_role.php

@@ -1,36 +0,0 @@
-<?php
-
-use App\Events\SendEmailEvent;
-use App\MailEvent;
-use App\Role;
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\DB;
-use Illuminate\Support\Facades\Schema;
-
-class AddDefaultMailEventRole extends Migration
-{
-    protected $role;
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        $this->role =  Role::query()->firstOrCreate(['name'=>'发送邮件测试']);
-        $emailEvent = MailEvent::query()->where('name', '发送默认邮件')->first();
-        $emailEvent->roles()->attach($this->role->id);
-        $this->role->users()->attach(\App\User::query()->where('name','yang')->first()->id);
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        $this->role->delete();
-    }
-}