This commit is contained in:
Kevin Adametz 2020-02-14 10:18:20 +01:00
parent bed91c4f4a
commit c8948338bb
122 changed files with 7911 additions and 1639 deletions

View file

@ -37,8 +37,8 @@ class CreateBookingTable extends Migration
$table->date('end_date')->nullable();
$table->bigInteger('website_id')->nullable();
$table->string('travel_number', 30)->nullable();
$table->string('participant_name', 80)->nullable();
$table->string('participant_firstname', 80)->nullable();
$table->string('participant_name', 255)->nullable();
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
$table->bigInteger('participant_salutation_id')->nullable();
$table->string('ev_number', 255)->nullable();

View file

@ -31,7 +31,7 @@ class CreateLeadTable extends Migration
$table->tinyInteger('is_closed')->nullable()->default(0);
$table->bigInteger('initialcontacttype_id')->nullable();
$table->bigInteger('searchengine_id')->nullable();
$table->string('searchengine_keywords', 80)->nullable();
$table->string('searchengine_keywords', 255)->nullable();
$table->bigInteger('status_id');
$table->date('next_due_date')->nullable();
$table->bigInteger('website_id')->nullable();
@ -40,8 +40,8 @@ class CreateLeadTable extends Migration
$table->dateTime('updated_at');
$table->decimal('price', 10, 2)->nullable();
$table->bigInteger('pax')->nullable();
$table->string('participant_name', 80)->nullable();
$table->string('participant_firstname', 80)->nullable();
$table->string('participant_name', 255)->nullable();
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
$table->bigInteger('participant_salutation_id')->nullable();

View file

@ -29,7 +29,9 @@ class CreateIQContentTreeNodesTable extends Migration
$table->string('name', 64)->index();
$table->string('identifier', 80)->index();
$table->string('slug', 80)->index()->unique();
$table->string('description')->nullable();
$table->text('description')->nullable();
$table->string('title')->nullable();
$table->text('settings')->nullable();
$table->unsignedTinyInteger('pos')->default(0);

View file

@ -0,0 +1,81 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateTravelBookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('travel_booking', function (Blueprint $table) {
$table->increments('id');
$table->bigInteger('crm_booking_id')->nullable();
$table->integer('salutation_id')->nullable();
$table->string('first_name', 255)->nullable();
$table->string('last_name', 255)->nullable();
$table->string('street', 255)->nullable();
$table->string('zipcode', 255)->nullable();
$table->string('city', 255)->nullable();
$table->integer('country_id')->nullable();
$table->string('fax', 255)->nullable();
$table->string('phone', 255)->nullable();
$table->string('mobile', 255)->nullable();
$table->text('comments')->nullable();
$table->string('email', 255)->nullable();
$table->dateTime('created')->nullable();
$table->date('selected_start_date')->nullable();
$table->date('selected_end_date')->nullable();
$table->string('program_name', 255)->nullable();
$table->text('selected_travel')->nullable();
$table->text('selected_departure')->nullable();
$table->integer('program_id')->nullable();
$table->integer('period_id')->nullable();
$table->string('class', 255)->nullable();
$table->integer('selected_adults')->nullable();
$table->integer('selected_childs')->nullable();
$table->integer('participants_total')->nullable();
$table->text('participants')->nullable();
$table->text('drafts')->nullable();
$table->text('service_items')->nullable();
$table->text('arrangements')->nullable();
$table->text('rooms')->nullable();
$table->decimal('price', 10, 2)->nullable();
$table->decimal('price_total', 10, 2)->nullable();
$table->decimal('deposit_total', 10, 2)->nullable();
$table->decimal('final_payment', 10, 2)->nullable();
$table->date('final_payment_date')->nullable();
$table->string('insurance_name', 255)->nullable();
$table->text('insurances')->nullable();
$table->integer('travel_cancellation')->nullable();
$table->text('options')->nullable();
$table->text('class_options')->nullable();;
$table->text('extra_category')->nullable();;
$table->unsignedTinyInteger('accept_legal_rights')->nullable();
$table->string('ip', 255)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('travel_booking');
}
}

View file

@ -0,0 +1,74 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateCustomerTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customer', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('salutation_id')->nullable();
$table->string('title', 255)->nullable();
$table->string('name', 255);
$table->string('firstname', 255)->nullable();
$table->date('birthdate')->nullable();
$table->string('company', 255)->nullable();
$table->string('street', 255)->nullable();
$table->string('zip', 255)->nullable();
$table->string('city', 255)->nullable();
$table->string('email', 255)->nullable();
$table->string('phone', 255)->nullable();
$table->string('phonebusiness', 255)->nullable();
$table->string('phonemobile', 255)->nullable();
$table->string('fax', 255)->nullable();
$table->string('bank', 80)->nullable();
$table->string('bank_code', 80)->nullable();
$table->string('bank_account_number', 80)->nullable();
$table->bigInteger('credit_card_type_id')->nullable();
$table->string('credit_card_number', 80)->nullable();
$table->date('credit_card_expiration_date')->nullable();
$table->text('participants_remarks')->nullable();
$table->text('miscellaneous_remarks')->nullable();
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->bigInteger('country_id')->nullable();
$table->index('salutation_id', 'salutation_id_idx');
$table->index('credit_card_type_id', 'credit_card_type_id_idx');
$table->index('country_id', 'country_id_idx');
$table->foreign('country_id', 'customer_country_id_travel_country_id')->references('id')->on('travel_country')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('credit_card_type_id', 'customer_credit_card_type_id_credit_card_type_id')->references('id')->on('credit_card_type')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('salutation_id', 'customer_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customer');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateInitialContactTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('initial_contact_type', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('initial_contact_type');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateSalutationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('salutation', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('salutation');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateSearchengineTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('searchengine', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('searchengine');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateTravelCategoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('travel_category', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('travel_category');
}
}

View file

@ -0,0 +1,58 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateInquiryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inquiry', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('lead_id')->nullable();
$table->bigInteger('template_id')->nullable();
$table->tinyInteger('in_pdf')->nullable()->default(0);
$table->date('begin')->nullable();
$table->date('end')->nullable();
$table->bigInteger('type_id')->nullable();
$table->string('type_s', 80)->nullable();
$table->text('data_s')->nullable();
$table->bigInteger('view_position')->nullable();
$table->index('lead_id', 'inquiry_lead_id_idx');
$table->index('template_id', 'inquiry_template_id_idx');
$table->index('type_id', 'inquiry_type_id_idx');
$table->foreign('lead_id', 'inquiry_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('template_id', 'inquiry_template_id_inquiry_template_id')->references('id')->on('inquiry_template')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('type_id', 'inquiry_type_id_inquiry_type_id')->references('id')->on('inquiry_type')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inquiry');
}
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateLeadParticipantTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lead_participant', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('lead_id')->nullable();
$table->string('participant_name', 255)->nullable();
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
$table->bigInteger('participant_salutation_id')->nullable();
$table->index('lead_id', 'lead_participant_lead_id_idx');
$table->index('participant_salutation_id', 'lead_participant_participant_salutation_id_idx');
$table->foreign('lead_id', 'lead_participant_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('participant_salutation_id', 'lead_participant_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lead_participant');
}
}

View file

@ -0,0 +1,48 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateOfferTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('offer', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('lead_id');
$table->decimal('total', 10, 2)->default(0.00);
// $table->UNKNOWN:longblob('binary_data');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->index('lead_id', 'offer_lead_id_idx');
$table->foreign('lead_id', 'offer_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('offer');
}
}

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateStatusHistoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('status_history', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('status_id');
$table->bigInteger('lead_id');
$table->integer('sf_guard_user_id');
$table->date('date');
$table->text('remarks')->nullable();
$table->date('target_date');
$table->dateTime('created_at');
$table->index('sf_guard_user_id', 'sf_guard_user_id_idx');
$table->index('status_id', 'status_id_idx');
$table->index('lead_id', 'lead_id_idx');
$table->foreign('lead_id', 'status_history_lead_id_lead_id')->references('id')->on('lead')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('sf_guard_user_id', 'status_history_sf_guard_user_id_sf_guard_user_id')->references('id')->on('sf_guard_user')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('status_id', 'status_history_status_id_status_id')->references('id')->on('status')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('status_history');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateWebsiteTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('website', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('website');
}
}

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateCouponTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('coupon', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('number', 30)->nullable();
$table->bigInteger('customer_id');
$table->bigInteger('booking_id');
$table->decimal('value', 10, 2)->default(0.00);
$table->date('issue_date');
$table->date('valid_date');
$table->tinyInteger('is_redeemed')->default(0);
$table->date('redeem_date')->nullable();
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->index('customer_id', 'customer_id_idx');
$table->index('booking_id', 'booking_id_idx');
$table->foreign('booking_id', 'coupon_booking_id_booking_id')->references('id')->on('booking')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('customer_id', 'coupon_customer_id_customer_id')->references('id')->on('customer')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('coupon');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateCreditCardTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('credit_card_type', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('credit_card_type');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateInquiryTemplateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inquiry_template', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title', 130)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inquiry_template');
}
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateInquiryTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inquiry_type', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 80);
$table->bigInteger('arrangement_type_id')->nullable();
$table->index('arrangement_type_id', 'inquiry_type_arrangement_type_id_idx');
$table->foreign('arrangement_type_id', 'inquiry_type_arrangement_type_id_arrangement_type_id')->references('id')->on('arrangement_type')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inquiry_type');
}
}

View file

@ -0,0 +1,50 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateInsuranceCertificateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('insurance_certificate', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id');
$table->bigInteger('internal_id');
$table->string('filename', 255);
// $table->UNKNOWN:longblob('binary_data');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->text('request_data')->nullable();
$table->index('booking_id', 'booking_id_idx');
$table->foreign('booking_id', 'insurance_certificate_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('insurance_certificate');
}
}

View file

@ -0,0 +1,52 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateParticipantTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('participant', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id')->nullable();
$table->string('participant_name', 255)->nullable();
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
$table->bigInteger('participant_salutation_id')->nullable();
$table->tinyInteger('participant_child')->nullable()->default(0);
$table->index('booking_id', 'participant_booking_id_idx');
$table->index('participant_salutation_id', 'participant_participant_salutation_id_idx');
$table->foreign('booking_id', 'participant_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('participant_salutation_id', 'participant_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('participant');
}
}

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateArrangementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('arrangement', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('template_id')->nullable();
$table->date('state')->nullable();
$table->date('begin')->nullable();
$table->date('end')->nullable();
$table->string('type_s', 255)->nullable();
$table->text('data_s')->nullable();
$table->bigInteger('view_position')->nullable();
$table->bigInteger('booking_id')->nullable();
$table->bigInteger('type_id');
$table->tinyInteger('in_pdf')->nullable()->default(0);
$table->index('template_id', 'arrangement_template_id_idx');
$table->index('booking_id', 'arrangement_booking_id_idx');
$table->foreign('booking_id', 'arrangement_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('template_id', 'arrangement_template_id_arrangement_template_id')->references('id')->on('arrangement_template')->onDelete('CASCADE
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('arrangement');
}
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateArrangementTemplateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('arrangement_template', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title', 130)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('arrangement_template');
}
}

View file

@ -0,0 +1,48 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateArrangementTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('arrangement_type', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 80);
$table->bigInteger('notify_rel_days')->nullable()->default(-19);
$table->bigInteger('arrangement_type_id')->nullable()->default(4);
$table->tinyInteger('is_unique')->nullable()->default(0);
$table->bigInteger('notify_rel_field_key')->nullable()->default(1);
$table->index('arrangement_type_id', 'arrangement_type_arrangement_type_id_idx');
$table->foreign('arrangement_type_id', 'arrangement_type_arrangement_type_id_arrangement_type_id')->references('id')->on('arrangement_type')->onDelete('CASCADE
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('arrangement_type');
}
}

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateBookingServiceItemTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('booking_service_item', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id');
$table->bigInteger('travel_company_id');
$table->decimal('service_price', 10, 2)->default(0.00);
$table->decimal('service_price_refund', 10, 2)->nullable()->default(0.00);
$table->decimal('commission', 10, 2)->default(0.00);
$table->date('travel_date');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->string('name', 255)->nullable();
$table->tinyInteger('is_commission_locked')->default(0);
$table->index('travel_company_id', 'travel_company_id_idx');
$table->index('booking_id', 'booking_id_idx');
$table->foreign('booking_id', 'booking_service_item_booking_id_booking_id')->references('id')->on('booking')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
$table->foreign('travel_company_id', 'booking_service_item_travel_company_id_travel_company_id')->references('id')->on('travel_company')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('booking_service_item');
}
}

View file

@ -0,0 +1,42 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateTravelCompanyTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('travel_company', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
$table->decimal('percentage', 6, 2)->nullable();
$table->tinyInteger('is_allowed_edit_commission')->nullable()->default(0);
$table->tinyInteger('is_inhouse')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('travel_company');
}
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateServiceProviderTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('service_provider', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
$table->unsignedTinyInteger('dollar')->nullable()->default(0);
$table->string('type', 255)->nullable();
$table->index('type', 'service_provider_type_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('service_provider');
}
}

View file

@ -0,0 +1,58 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateServiceProviderEntryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('service_provider_entry', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id');
$table->bigInteger('service_provider_id');
$table->decimal('amount', 10, 2);
$table->decimal('amount_eur', 10, 2)->nullable()->default(0.00);
$table->decimal('factor', 6, 4)->nullable()->default(1.0000);
$table->date('payment_date')->nullable();
$table->string('invoice_number', 255)->nullable();
$table->tinyInteger('is_cleared')->nullable()->default(0);
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->string('type', 255)->nullable();
$table->index('booking_id', 'service_provider_payment_booking_id_idx');
$table->index('service_provider_id', 'service_provider_payment_service_provider_id_idx');
$table->index('type', 'service_provider_payment_type_idx');
$table->foreign('booking_id', 'service_provider_payment_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
')->onUpdate('RESTRICT');
$table->foreign('service_provider_id', 'service_provider_payment_service_provider_id_service_provider_id')->references('id')->on('service_provider')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('service_provider_entry');
}
}