32 lines
706 B
PHP
32 lines
706 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class RemoveReservation extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
/*
|
|
public function up()
|
|
{
|
|
\Illuminate\Support\Facades\DB::unprepared("CREATE OR REPLACE EVENT `remove_reservation` ON SCHEDULE EVERY 1 HOUR STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO
|
|
DELETE FROM washing_reservations WHERE time <= DATE_SUB(NOW(), INTERVAL 1 HOUR)");
|
|
}
|
|
*/
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
//
|
|
}
|
|
}
|