update migrations
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributeFamiliesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_families', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_families');
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributeValuesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_values', function (Blueprint $table) {
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('attribute_family_id')->unsigned()->nullable();
|
||||
$table->boolean('type_value')->nullable()->comment('1 = INT, 2 = DECIMAL, 3 = STRING');
|
||||
$table->string('value', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_values');
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attributes', function (Blueprint $table) {
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('attribute_value_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attributes');
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_categories');
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticlePricesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_prices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_attribute_id')->unsigned()->nullable();
|
||||
$table->decimal('price', 10)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_prices');
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_categories');
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopCustomersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_customers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->uuid('uuid')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->dateTime('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('remember_token', 100)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_customers');
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopInvoiceItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoice_items', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('invoice_id')->nullable();
|
||||
$table->integer('product_id')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->decimal('unit_price', 10);
|
||||
$table->integer('tax_id')->nullable();
|
||||
$table->integer('raw_price')->nullable();
|
||||
$table->integer('tax')->nullable();
|
||||
$table->integer('total_price')->nullable();
|
||||
$table->decimal('discount_percent')->nullable();
|
||||
$table->decimal('discount')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoice_items');
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopOrderPaymentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_order_payments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_order_payments');
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('shop_article_natures', function (Blueprint $table) {
|
||||
$table->string('slug', 50)->after('name')->nullable();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShopHomepagesTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -12,7 +13,7 @@ class CreateShopHomepagesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_homepages', function (Blueprint $table) {
|
||||
Schema::create('shop_contents', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('text');
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
@@ -30,6 +31,6 @@ class CreateShopHomepagesTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_homepages');
|
||||
}
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShopArticleComponentsTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -12,10 +13,10 @@ class CreateShopArticleComponentsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_components', function (Blueprint $table) {
|
||||
Schema::create('shop_customer_deliveries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->string('model')->nullable();
|
||||
$table->unsignedInteger('customer_id')->default(0)->index('customer_id');
|
||||
$table->integer('delivery_id')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
@@ -28,6 +29,6 @@ class CreateShopArticleComponentsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_components');
|
||||
}
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShopArticlesTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -12,10 +13,13 @@ class CreateShopArticlesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_articles', function (Blueprint $table) {
|
||||
Schema::create('shop_delivery_types', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$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();
|
||||
});
|
||||
@@ -28,6 +32,6 @@ class CreateShopArticlesTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_articles');
|
||||
}
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShopInvoicesTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -12,13 +13,12 @@ class CreateShopInvoicesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoices', function (Blueprint $table) {
|
||||
Schema::create('shop_packages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->boolean('status_id');
|
||||
$table->decimal('subtotal', 10);
|
||||
$table->decimal('total', 10);
|
||||
$table->decimal('shipping', 10);
|
||||
$table->string('value', 50)->nullable();
|
||||
$table->smallInteger('created_by')->nullable();
|
||||
$table->smallInteger('updated_by')->nullable();
|
||||
$table->smallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
@@ -31,6 +31,6 @@ class CreateShopInvoicesTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoices');
|
||||
}
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShopOrdersTable extends Migration
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -12,10 +13,9 @@ class CreateShopOrdersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_orders', function (Blueprint $table) {
|
||||
Schema::create('shop_taxes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->unsignedDecimal('value', 5)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ class CreateShopOrdersTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_orders');
|
||||
}
|
||||
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