2022-11-23 09:32:34 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('rooms', function (Blueprint $table) {
|
|
|
|
$table->id('room_id');
|
|
|
|
$table->timestamps();
|
2022-12-08 09:30:07 +01:00
|
|
|
$table->string('room_name');
|
|
|
|
$table->integer('room_rows');
|
|
|
|
$table->integer('room_columns');
|
|
|
|
$table->foreignId('cinema_id')->constrained('cinemas', 'cinema_id');
|
|
|
|
$table->foreignId('user_id')->constrained('users', 'user_id'); // who created this room
|
2022-11-23 09:32:34 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('rooms');
|
|
|
|
}
|
|
|
|
};
|