08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
|
|
@ -22,6 +22,8 @@ class CreateUsersTable extends Migration
|
|||
$table->unsignedInteger('m_level')->nullable();
|
||||
$table->unsignedInteger('m_sponsor')->nullable();
|
||||
|
||||
$table->unsignedInteger('pre_sponsor')->nullable();
|
||||
|
||||
$table->boolean('confirmed')->default(false);
|
||||
$table->string('confirmation_code', 30)->index()->nullable();
|
||||
$table->timestamp('confirmation_date')->nullable();
|
||||
|
|
@ -68,6 +70,11 @@ class CreateUsersTable extends Migration
|
|||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('pre_sponsor')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
|
||||
$table->foreign('payment_order_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class CreateCountriesTable extends Migration
|
|||
$table->boolean('supply_country')->default(false);
|
||||
$table->boolean('eu_country')->default(false);
|
||||
$table->boolean('switch')->default(false);
|
||||
$table->boolean('translate')->default(false);
|
||||
$table->boolean('own_eur')->default(false);
|
||||
$table->boolean('currency')->default(false);
|
||||
$table->string('currency_unit', 10)->nullable();
|
||||
|
|
@ -38,7 +39,6 @@ class CreateCountriesTable extends Migration
|
|||
$table->text('trans_name')->nullable();
|
||||
$table->text('attr')->nullable();
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ class CreateAttributesTable extends Migration
|
|||
|
||||
$table->unsignedInteger('parent_id')->index()->nullable();
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,13 +17,8 @@ class CreateProductsTable extends Migration
|
|||
$table->increments('id');
|
||||
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
|
||||
$table->string('title')->index();
|
||||
$table->text('trans_title')->nullable();
|
||||
|
||||
$table->text('copy')->nullable();
|
||||
$table->mediumText('trans_copy')->nullable();
|
||||
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
$table->decimal('price_ek', 8, 2)->nullable();
|
||||
|
|
@ -49,13 +44,10 @@ class CreateProductsTable extends Migration
|
|||
$table->string('icons')->nullable(); //as array cast
|
||||
|
||||
$table->text('description')->nullable();
|
||||
$table->mediumText('trans_description')->nullable();
|
||||
|
||||
$table->text('usage')->nullable();
|
||||
$table->mediumText('trans_usage')->nullable();
|
||||
|
||||
$table->text('ingredients')->nullable();
|
||||
$table->mediumText('trans_ingredients')->nullable();
|
||||
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ class CreateUserShopsTable extends Migration
|
|||
$table->string('title')->nullable();
|
||||
|
||||
$table->string('contact')->nullable();
|
||||
|
||||
$table->string('accessibility')->nullable();
|
||||
|
||||
$table->string('about')->nullable();
|
||||
$table->text('trans')->nullable();
|
||||
|
||||
|
||||
$table->string('featured')->nullable();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ class CreateShoppingInstancesTable extends Migration
|
|||
$table->unsignedInteger('auth_user_id');
|
||||
$table->unsignedTinyInteger('payment');
|
||||
$table->unsignedInteger('country_id');
|
||||
$table->char('language', 2)->nullable();
|
||||
|
||||
|
||||
$table->string('subdomain');
|
||||
$table->text('shopping_data')->nullable();
|
||||
$table->string('back');
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class CreateShoppingUsersTable extends Migration
|
|||
|
||||
$table->unsignedInteger('number')->index()->nullable();
|
||||
$table->boolean('is_like')->default(false);
|
||||
$table->char('language', 2)->nullable();
|
||||
|
||||
$table->char('billing_salutation', 2)->nullable();
|
||||
$table->string('billing_company')->nullable();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class CreateShoppingOrdersTable extends Migration
|
|||
$table->unsignedInteger('auth_user_id');
|
||||
|
||||
$table->unsignedInteger('country_id');
|
||||
$table->char('language', 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('user_shop_id');
|
||||
|
||||
$table->unsignedInteger('member_id')->nullable();
|
||||
|
|
@ -46,6 +48,9 @@ class CreateShoppingOrdersTable extends Migration
|
|||
$table->unsignedInteger('weight')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->boolean('is_abo')->default(false);
|
||||
$table->unsignedTinyInteger('abo_interval')->nullable();
|
||||
|
||||
$table->string('wp_invoice_path', 255)->nullable();
|
||||
$table->text('api_notice')->nullable();
|
||||
$table->unsignedTinyInteger('api_status')->nullable();
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ class CreateShoppingPaymentsTable extends Migration
|
|||
|
||||
$table->string('status', 10)->nullable()->index();
|
||||
$table->string('txaction', 20)->nullable()->index();
|
||||
|
||||
$table->boolean('is_abo')->default(false);
|
||||
$table->unsignedTinyInteger('abo_interval')->nullable();
|
||||
|
||||
$table->char('mode', 4)->nullable();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class CreateUserAccountsTable extends Migration
|
|||
$table->string('tax_identification_number', 20)->nullable();
|
||||
$table->unsignedTinyInteger('taxable_sales')->nullable();
|
||||
|
||||
$table->boolean('reverse_charge')->default(true);
|
||||
$table->boolean('reverse_charge')->default(false);
|
||||
$table->char('reverse_charge_code', 2)->nullable();
|
||||
$table->timestamp('reverse_charge_valid')->nullable();
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class CreateUserHistoriesTable extends Migration
|
|||
$table->string('identifier')->index()->nullable();
|
||||
|
||||
$table->boolean('abo_options')->default(false);
|
||||
$table->boolean('is_abo')->default(false);
|
||||
|
||||
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ class CreatePaymentMethodsTable extends Migration
|
|||
$table->unsignedTinyInteger('pos')->nullable()->default(0);
|
||||
$table->boolean('active')->default(false);
|
||||
$table->boolean('default')->default(false);
|
||||
$table->boolean('is_abo')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class CreateHomepartiesTable extends Migration
|
|||
$table->string('name')->nullable();
|
||||
$table->string('place')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('trans_description')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('pos')->default(0);
|
||||
$table->unsignedTinyInteger('completed')->default(0);
|
||||
|
|
|
|||
|
|
@ -17,13 +17,8 @@ class CreateIngredientsTable extends Migration
|
|||
$table->increments('id');
|
||||
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
|
||||
$table->text('inci')->nullable();
|
||||
$table->mediumText('trans_inci')->nullable();
|
||||
|
||||
$table->text('effect')->nullable();
|
||||
$table->mediumText('trans_effect')->nullable();
|
||||
|
||||
$table->boolean('active')->default(false);
|
||||
$table->unsignedTinyInteger('pos')->nullable()->default(0);
|
||||
|
|
@ -42,4 +37,4 @@ class CreateIngredientsTable extends Migration
|
|||
{
|
||||
Schema::dropIfExists('ingredients');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ class CreateUserSalesVolumesTable extends Migration
|
|||
$table->integer('month_points')->nullable();
|
||||
$table->integer('month_shop_points')->nullable();
|
||||
$table->unsignedTinyInteger('status_points')->index()->default(1);
|
||||
$table->unsignedTinyInteger('status_turnover')->index()->default(1);
|
||||
|
||||
$table->decimal('total_net', 13, 2)->nullable();
|
||||
$table->decimal('month_total_net', 13, 2)->nullable();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ class CreateUserBusinessesTable extends Migration
|
|||
$table->string('email')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('user_birthday')->nullable();
|
||||
$table->string('user_phone')->nullable();
|
||||
|
||||
$table->integer('sales_volume_KP_points')->nullable();
|
||||
$table->integer('sales_volume_TP_points')->nullable();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ class CreateUserCreditItemsTable extends Migration
|
|||
$table->decimal('credit', 13, 2)->nullable();
|
||||
$table->text('message')->nullable();
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
$table->unsignedTinyInteger('from_month')->nullable();
|
||||
$table->unsignedSmallInteger('from_year')->nullable();
|
||||
$table->boolean('paid')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
|
|
@ -44,4 +46,4 @@ class CreateUserCreditItemsTable extends Migration
|
|||
{
|
||||
Schema::dropIfExists('user_credit_items');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -43,4 +43,4 @@ class CreateProductBuyingsTable extends Migration
|
|||
{
|
||||
Schema::dropIfExists('product_buyings');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserCleanUpLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_clean_up_logs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('inactive_sponsor_id');
|
||||
$table->unsignedInteger('child_user_id');
|
||||
$table->unsignedInteger('new_sponsor_id');
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('inactive_sponsor_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('child_user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('new_sponsor_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_clean_up_logs');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShoppingUserMemberLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shopping_user_member_logs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('pre_member_id');
|
||||
$table->unsignedInteger('shopping_user_id');
|
||||
$table->unsignedInteger('new_member_id');
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('pre_member_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('shopping_user_id')
|
||||
->references('id')
|
||||
->on('shopping_users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('new_member_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shopping_user_member_logs');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransProductsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('trans_products', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('language', 2)->index();
|
||||
$table->unsignedInteger('product_id')->index();
|
||||
|
||||
$table->string('key')->nullable();
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('trans_products');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransIngredientsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('trans_ingredients', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('language', 2)->index();
|
||||
$table->unsignedInteger('ingredient_id')->index();
|
||||
|
||||
$table->string('key')->nullable();
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
$table->foreign('ingredient_id')
|
||||
->references('id')
|
||||
->on('ingredients');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('trans_ingredients');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransUserLevelsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('trans_user_levels', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('language', 2)->index();
|
||||
$table->unsignedInteger('user_level_id')->index();
|
||||
|
||||
$table->string('key')->nullable();
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_level_id')
|
||||
->references('id')
|
||||
->on('user_levels');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('trans_user_levels');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransShippingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('trans_shippings', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('language', 2)->index();
|
||||
$table->unsignedInteger('shipping_id')->index();
|
||||
|
||||
$table->string('key')->nullable();
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('shipping_id')
|
||||
->references('id')
|
||||
->on('shippings');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('trans_shippings');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('trans_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('language', 2)->index();
|
||||
$table->unsignedInteger('categorie_id')->index();
|
||||
|
||||
$table->string('key')->nullable();
|
||||
$table->text('value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('categorie_id')
|
||||
->references('id')
|
||||
->on('categories');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('trans_categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDcCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dc_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->index();
|
||||
$table->unsignedTinyInteger('pos')->default(0);
|
||||
$table->string('slug')->unique();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dc_categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDcTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dc_tags', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('category_id')->nullable();
|
||||
$table->string('name')->index();
|
||||
$table->unsignedTinyInteger('pos')->default(0);
|
||||
$table->string('slug')->unique();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dc_tags');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDcFilesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dc_files', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('filename')->index();
|
||||
$table->string('original_name')->index();
|
||||
$table->string('ext')->index();
|
||||
$table->string('mine')->default('');
|
||||
$table->integer('size')->nullable();
|
||||
$table->tinyInteger('active')->nullable()->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dc_files');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDcFileTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dc_file_tags', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('file_id');
|
||||
$table->unsignedInteger('tag_id');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('file_id')->references('id')->on('dc_files')->onDelete('cascade');;
|
||||
$table->foreign('tag_id')->references('id')->on('dc_tags')->onDelete('cascade');;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dc_file_tags');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
class CreateDbipLookup2Table extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dbip_lookup_2', function (Blueprint $table) {
|
||||
$table->enum('addr_type', ['ipv4', 'ipv6'])->index();
|
||||
$table->string('ip_start', 16)->index();
|
||||
$table->string('ip_end', 16);
|
||||
$table->char('country', 2);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dbip_lookup_2');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
class CreateDbipLookup3Table extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dbip_lookup_3', function (Blueprint $table) {
|
||||
$table->enum('addr_type', ['ipv4', 'ipv6'])->index();
|
||||
$table->string('ip_start', 16)->index();
|
||||
$table->string('ip_end', 16);
|
||||
$table->char('country', 2);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dbip_lookup_3');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
class CreateDbipLookupTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dbip_lookup', function (Blueprint $table) {
|
||||
$table->enum('addr_type', ['ipv4', 'ipv6'])->index();
|
||||
$table->string('ip_start', 16)->index();
|
||||
$table->string('ip_end', 16);
|
||||
$table->char('country', 2);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dbip_lookup');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserAbosTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_abos', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_id')->nullable();
|
||||
$table->unsignedInteger('shopping_user_id');
|
||||
$table->char('is_for', 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('payone_userid');
|
||||
$table->string('clearingtype',3);
|
||||
$table->string('wallettype', 3)->nullable();
|
||||
$table->unsignedInteger('amount');
|
||||
$table->string('currency', 6);
|
||||
|
||||
$table->boolean('active')->default(true);
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->unsignedTinyInteger('abo_interval')->default(0);
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('last_date')->nullable();
|
||||
$table->date('next_date')->nullable();
|
||||
$table->date('cancel_date')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('count')->default(0);
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->timestamp('user_deleted_at')->nullable();
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('shopping_user_id')
|
||||
->references('id')
|
||||
->on('shopping_users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_abos');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserAboOrdersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_abo_orders', function (Blueprint $table) {
|
||||
|
||||
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_abo_id');
|
||||
$table->unsignedInteger('shopping_order_id');
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_abo_id')
|
||||
->references('id')
|
||||
->on('user_abos')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_abo_orders');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue