<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTriggerUserDelete extends Migration
{
public function up()
{
\DB::unprepared('DELIMITER //
CREATE TRIGGER DeleteUserDependency
BEFORE DELETE
ON tbluser FOR EACH ROW
BEGIN
Delete from tblticket where ModuleID = 1;
END');
}
}
I am facing Error. Details are here: Syntax error or access violation: 1064 You have an error in your SQl syntax ; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELIMITER //
Am I missing something?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire