update migrations
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicFamiliesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_families', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_families');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicGenresTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_genres', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('family_id')->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_genres');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicSpeciesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_species', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('genre_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('genre_name', 50)->nullable();
|
||||
$table->string('subspecies', 50)->nullable();
|
||||
$table->boolean('germination_legal')->nullable();
|
||||
$table->string('pmg', 50)->nullable();
|
||||
$table->string('grow_duration', 50)->nullable();
|
||||
$table->string('vegetative_cycle', 50)->nullable();
|
||||
$table->string('reglementary_status', 50)->nullable();
|
||||
$table->boolean('add_germination')->nullable();
|
||||
$table->boolean('add_life_duration')->nullable();
|
||||
$table->text('add_diseases', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_species');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicVarietiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_varieties', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('specie_id')->unsigned()->nullable();
|
||||
$table->string('specie_name', 50)->nullable();
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('range', 50)->nullable();
|
||||
$table->string('category', 50)->nullable();
|
||||
$table->string('life_duration', 50)->nullable();
|
||||
$table->string('packaging', 50)->nullable();
|
||||
$table->string('unit', 50)->nullable();
|
||||
$table->string('characteristics', 50)->nullable();
|
||||
$table->string('nutrition_quality', 50)->nullable();
|
||||
$table->string('production_quality', 50)->nullable();
|
||||
$table->string('size', 50)->nullable();
|
||||
$table->string('maturity', 50)->nullable();
|
||||
$table->string('rusticity', 50)->nullable();
|
||||
$table->string('color', 50)->nullable();
|
||||
$table->string('usage', 50)->nullable();
|
||||
$table->string('pot_culture', 50)->nullable();
|
||||
$table->string('color_type', 50)->nullable();
|
||||
$table->string('plant', 50)->nullable();
|
||||
$table->text('description_2', 65535)->nullable();
|
||||
$table->text('genre', 65535)->nullable();
|
||||
$table->text('specie_latin')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_varieties');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('shop_article_natures', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedTinyInteger('product_type')->nullable()->index('product_type')->comment('1 Botanic, 2 Merchandise');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('slug', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_article_natures');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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('shop_articles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('article_nature_id')->nullable()->index('family_id');
|
||||
$table->string('product_type', 100)->nullable();
|
||||
$table->unsignedInteger('product_id')->nullable();
|
||||
$table->string('ref', 50)->nullable()->unique('ref');
|
||||
$table->string('name')->nullable();
|
||||
$table->unsignedInteger('hash')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->tinyInteger('visible')->nullable();
|
||||
$table->unsignedTinyInteger('homepage')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['product_type', 'product_id'], 'product_type');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_articles');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('shop_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('category_id')->nullable()->index('category_id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->tinyInteger('visible')->nullable();
|
||||
$table->unsignedTinyInteger('homepage')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_categories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('shop_contents', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('text');
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_contents');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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('shop_customer_addresses', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('customer_id')->nullable()->index('customer_id');
|
||||
$table->unsignedTinyInteger('priority')->nullable();
|
||||
$table->unsignedTinyInteger('type')->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('address2')->nullable();
|
||||
$table->string('zipcode', 30)->nullable();
|
||||
$table->string('city', 50)->nullable();
|
||||
$table->string('country', 50)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_customer_addresses');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('shop_customer_deliveries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('customer_id')->default(0)->index('customer_id');
|
||||
$table->integer('delivery_id')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_customer_deliveries');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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('shop_customer_sale_channels', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('customer_id')->nullable()->index('customer_id');
|
||||
$table->unsignedInteger('sale_channel_id')->nullable()->index('sale_channel_id');
|
||||
$table->unsignedInteger('created_by')->nullable();
|
||||
$table->unsignedInteger('updated_by')->nullable();
|
||||
$table->unsignedInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_customer_sale_channels');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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('shop_customers', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->char('uuid', 36)->nullable()->index('uuid');
|
||||
$table->boolean('active')->default(false);
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('company')->nullable();
|
||||
$table->string('tva')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('address2')->nullable();
|
||||
$table->string('zipcode', 30)->nullable();
|
||||
$table->string('city', 50)->nullable();
|
||||
$table->string('country', 50)->nullable();
|
||||
$table->string('email')->unique('users_email_unique');
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->json('settings')->nullable();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->boolean('verified')->default(false);
|
||||
$table->string('verification_token')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_customers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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('shop_deliveries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('sale_channel_id')->nullable()->index('sale_channel_id');
|
||||
$table->unsignedTinyInteger('active')->nullable()->index('active');
|
||||
$table->unsignedTinyInteger('is_public')->nullable();
|
||||
$table->unsignedTinyInteger('at_house')->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('address2')->nullable();
|
||||
$table->string('zipcode', 50)->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('country', 50)->nullable();
|
||||
$table->dateTime('event_date_begin')->nullable();
|
||||
$table->dateTime('event_date_end')->nullable();
|
||||
$table->dateTime('created_by')->nullable();
|
||||
$table->dateTime('updated_by')->nullable();
|
||||
$table->dateTime('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_deliveries');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('shop_delivery_packages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('weight')->nullable()->default(0);
|
||||
$table->unsignedTinyInteger('weight_flyer')->nullable()->default(0);
|
||||
$table->unsignedSmallInteger('weight_packaging')->nullable()->default(0);
|
||||
$table->unsignedSmallInteger('weight_useful')->nullable()->default(0);
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_delivery_packages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('shop_delivery_type_calculations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('type_id')->nullable()->index('type_id');
|
||||
$table->unsignedMediumInteger('weight')->nullable()->default(0);
|
||||
$table->unsignedDecimal('price', 7)->nullable()->default(0);
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_delivery_type_calculations');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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('shop_delivery_types', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->smallInteger('created_by')->nullable();
|
||||
$table->smallInteger('updated_by')->nullable();
|
||||
$table->smallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_delivery_types');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('shop_invoice_payments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('invoice_id')->nullable()->index('order_id');
|
||||
$table->unsignedTinyInteger('payment_type')->nullable();
|
||||
$table->float('amount', 7)->nullable();
|
||||
$table->tinyText('reference')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
$table->json('data')->nullable();
|
||||
$table->unsignedTinyInteger('validated')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_invoice_payments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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('shop_invoices', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->char('uuid', 36)->nullable()->index('uuid');
|
||||
$table->string('ref', 50)->nullable();
|
||||
$table->unsignedInteger('customer_id')->nullable()->index('customer_id');
|
||||
$table->unsignedInteger('invoice_address_id')->nullable();
|
||||
$table->unsignedMediumInteger('order_id')->nullable()->index('order_id');
|
||||
$table->unsignedTinyInteger('payment_type')->nullable();
|
||||
$table->unsignedTinyInteger('status')->nullable()->default(0)->index('status');
|
||||
$table->decimal('total', 10);
|
||||
$table->decimal('taxes', 10);
|
||||
$table->decimal('total_taxed', 10);
|
||||
$table->decimal('shipping', 10);
|
||||
$table->decimal('total_shipped', 10);
|
||||
$table->date('date_invoice')->nullable();
|
||||
$table->date('date_due')->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_invoices');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('shop_merchandises', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('producer_id')->nullable()->index('producer_id');
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('plus')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_merchandises');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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('shop_offers', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('article_id')->nullable()->index('article_id');
|
||||
$table->unsignedTinyInteger('status_id')->nullable()->index('status_id');
|
||||
$table->unsignedMediumInteger('variation_id')->nullable()->index('variation_id');
|
||||
$table->unsignedMediumInteger('tariff_id')->nullable()->index('tariff_id');
|
||||
$table->unsignedMediumInteger('weight')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedDecimal('stock_current', 10)->nullable();
|
||||
$table->unsignedDecimal('stock_delayed', 10)->nullable();
|
||||
$table->tinyText('delay_type')->nullable();
|
||||
$table->unsignedTinyInteger('stock_ondemand')->nullable();
|
||||
$table->unsignedDecimal('minimum_ondemand', 10)->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_offers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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('shop_order_details', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('order_id')->nullable()->index('order_id');
|
||||
$table->unsignedInteger('offer_id')->nullable()->index('offer_id');
|
||||
$table->tinyText('name')->nullable();
|
||||
$table->unsignedInteger('quantity')->default(0);
|
||||
$table->unsignedDecimal('vat', 5)->default(0);
|
||||
$table->unsignedDecimal('price', 7)->default(0);
|
||||
$table->unsignedDecimal('tax', 7)->default(0);
|
||||
$table->unsignedDecimal('price_taxed', 7)->default(0);
|
||||
$table->unsignedDecimal('total', 7)->default(0);
|
||||
$table->unsignedDecimal('total_tax', 7)->default(0);
|
||||
$table->unsignedDecimal('total_taxed', 7)->default(0);
|
||||
$table->unsignedMediumInteger('weight')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_order_details');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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('shop_orders', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('uuid', 36)->nullable()->index('uuid');
|
||||
$table->string('ref', 50)->nullable();
|
||||
$table->unsignedInteger('customer_id')->nullable()->index('customer_id');
|
||||
$table->unsignedInteger('delivery_address_id')->nullable();
|
||||
$table->unsignedSmallInteger('sale_channel_id')->nullable()->index('sale_channel_id');
|
||||
$table->unsignedSmallInteger('delivery_id')->nullable()->index('delivery_id');
|
||||
$table->string('delivery_ref', 50)->nullable();
|
||||
$table->tinyInteger('delivery_type_id')->nullable();
|
||||
$table->tinyText('delivery_link')->nullable();
|
||||
$table->unsignedTinyInteger('payment_type')->nullable();
|
||||
$table->unsignedTinyInteger('status')->nullable()->default(0);
|
||||
$table->unsignedTinyInteger('tax')->nullable()->default(0);
|
||||
$table->unsignedDecimal('total', 10)->nullable();
|
||||
$table->unsignedDecimal('taxes', 10)->nullable();
|
||||
$table->unsignedDecimal('total_taxed', 10)->nullable();
|
||||
$table->unsignedDecimal('shipping', 10)->nullable();
|
||||
$table->unsignedDecimal('total_shipped', 10)->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_orders');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('shop_packages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('value', 50)->nullable();
|
||||
$table->smallInteger('created_by')->nullable();
|
||||
$table->smallInteger('updated_by')->nullable();
|
||||
$table->smallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_packages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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('shop_price_list_values', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('price_list_id')->nullable()->index('price_list_id');
|
||||
$table->string('code', 50)->nullable();
|
||||
$table->unsignedDecimal('quantity', 7)->nullable();
|
||||
$table->decimal('price', 7)->nullable()->default(0);
|
||||
$table->decimal('price_taxed', 7)->nullable()->default(0);
|
||||
$table->tinyInteger('tax_id')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_price_list_values');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('shop_price_lists', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('tariff_id')->nullable()->index('tariff_id');
|
||||
$table->unsignedInteger('sale_channel_id')->nullable()->index('sale_channel_id');
|
||||
$table->unsignedTinyInteger('status_id')->nullable();
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_price_lists');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('shop_producers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->string('alias', 100)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedMediumInteger('created_by')->nullable();
|
||||
$table->unsignedMediumInteger('updated_by')->nullable();
|
||||
$table->unsignedMediumInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_producers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('shop_sale_channels', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('code', 20);
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_sale_channels');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('shop_tariff_unities', function (Blueprint $table) {
|
||||
$table->mediumInteger('id', true);
|
||||
$table->string('value', 50)->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_tariff_unities');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('shop_tariffs', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedSmallInteger('sale_channel_id')->default(0)->index('sale_channel_id');
|
||||
$table->unsignedTinyInteger('status_id')->default(0);
|
||||
$table->unsignedSmallInteger('tariff_unity_id')->default(0);
|
||||
$table->string('name')->nullable();
|
||||
$table->string('code', 50)->nullable();
|
||||
$table->string('ref', 50)->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_tariffs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('shop_taxes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedDecimal('value', 5)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_taxes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('shop_unities', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('value', 50)->nullable();
|
||||
$table->unsignedMediumInteger('created_by')->nullable();
|
||||
$table->unsignedMediumInteger('updated_by')->nullable();
|
||||
$table->unsignedMediumInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_unities');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('shop_variations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('package_id')->nullable()->index('attribute_family_id');
|
||||
$table->unsignedMediumInteger('unity_id')->nullable();
|
||||
$table->unsignedDecimal('quantity', 7)->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shop_variations');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user