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()
|
|
|
|
{
|
2022-12-08 09:30:07 +01:00
|
|
|
Schema::create('cinemas', function (Blueprint $table) {
|
|
|
|
$table->id('cinema_id');
|
2022-11-23 09:32:34 +01:00
|
|
|
$table->timestamps();
|
2022-12-08 09:30:07 +01:00
|
|
|
$table->string('cinema_name');
|
|
|
|
$table->foreignId('address_id')->constrained('addresses', 'address_id');
|
|
|
|
$table->foreignId('user_id')->constrained('users', 'user_id'); // who created this cinema
|
|
|
|
$table->timestamp('cinema_open')->nullable();
|
|
|
|
$table->timestamp('cinema_close')->nullable();
|
2022-11-23 09:32:34 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2022-12-08 09:30:07 +01:00
|
|
|
Schema::dropIfExists('cinemas');
|
2022-11-23 09:32:34 +01:00
|
|
|
}
|
|
|
|
};
|