IQ Reisebausteine bis Gruppe

This commit is contained in:
Kevin Adametz 2021-08-06 15:28:57 +02:00
parent 6880c7e989
commit 9baa1a6233
43 changed files with 2206 additions and 24 deletions

View file

@ -42,6 +42,7 @@ class CreateDraftItemsTable extends Migration
$table->foreign('draft_type_id')
->references('id')
->on('draft_types');
});
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTravelPlacesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('travel_places', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable();
$table->text('description')->nullable();
$table->integer('travel_country_id')->nullable();
$table->decimal('latitude', 10, 6)->nullable();
$table->decimal('longitude', 10, 6)->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('travel_country_id')
->references('id')
->on('travel_country');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('travel_places');
}
}

View file

@ -0,0 +1,65 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIQTravelBlocksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_travel_blocks', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable();
$table->text('description')->nullable();
$table->text('highlights')->nullable();
$table->unsignedInteger('draft_type_id')->nullable()->index();
$table->unsignedInteger('travel_place_id')->nullable()->index();
$table->integer('travel_country_id')->nullable();
$table->tinyInteger('days_start')->unsigned()->nullable();
$table->tinyInteger('days_duration')->unsigned()->nullable();
$table->tinyInteger('min_persons')->unsigned()->nullable();
$table->decimal('price_adult', 8, 2)->nullable();
$table->decimal('price_children', 8, 2)->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('draft_type_id')
->references('id')
->on('draft_types');
$table->foreign('travel_place_id')
->references('id')
->on('travel_places');
$table->foreign('travel_country_id')
->references('id')
->on('travel_country');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_blocks');
}
}

View file

@ -0,0 +1,58 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIQTravelItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_travel_items', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable();
$table->text('description')->nullable();
$table->text('highlights')->nullable();
$table->unsignedInteger('draft_type_id')->nullable()->index();
$table->integer('travel_country_id')->nullable();
$table->tinyInteger('days_start')->unsigned()->nullable();
$table->tinyInteger('days_duration')->unsigned()->nullable();
$table->tinyInteger('min_persons')->unsigned()->nullable();
$table->decimal('price_adult', 8, 2)->nullable();
$table->decimal('price_children', 8, 2)->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
/*$table->foreign('draft_type_id')
->references('id')
->on('draft_types');*/
$table->foreign('travel_country_id')
->references('id')
->on('travel_country');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_items');
}
}

View file

@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIQTravelItemPlacesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_travel_item_places', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('i_q_travel_item_id')->index();
$table->unsignedInteger('travel_place_id')->index();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->timestamps();
$table->foreign('i_q_travel_item_id')
->references('id')
->on('i_q_travel_items')
->onDelete('cascade');
$table->foreign('travel_place_id')
->references('id')
->on('travel_places')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_item_places');
}
}

View file

@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIQTravelGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_travel_groups', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable();
$table->text('description')->nullable();
$table->text('highlights')->nullable();
$table->tinyInteger('days_start')->unsigned()->nullable();
$table->tinyInteger('days_duration')->unsigned()->nullable();
$table->tinyInteger('min_persons')->unsigned()->nullable();
$table->decimal('price_adult', 8, 2)->nullable();
$table->decimal('price_children', 8, 2)->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_groups');
}
}

View file

@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIQTravelGroupItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_travel_group_items', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('i_q_travel_group_id')->index();
$table->unsignedInteger('i_q_travel_item_id')->index();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->timestamps();
$table->foreign('i_q_travel_group_id')
->references('id')
->on('i_q_travel_groups')
->onDelete('cascade');
$table->foreign('i_q_travel_item_id')
->references('id')
->on('i_q_travel_items')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_group_items');
}
}