Try new schema dump to trim migrations

This commit is contained in:
Deon George 2021-07-13 13:19:14 +10:00
parent b515a1edeb
commit 6e4c332dea
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
162 changed files with 2001 additions and 6464 deletions

View File

@ -28,6 +28,9 @@ test:
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.config/composer/auth.json ; fi - if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.config/composer/auth.json ; fi
- composer install - composer install
# Add mysql client for schema pre-load
- apt update && apt install -f mariadb-client
# Generate an application key. Re-cache. # Generate an application key. Re-cache.
- php artisan key:generate --env=testing - php artisan key:generate --env=testing
- php artisan config:cache --env=testing - php artisan config:cache --env=testing

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}

View File

@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountBillingTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account_billing', function(Blueprint $table)
{
$table->integer('id');
$table->integer('site_id');
$table->bigInteger('account_id')->nullable();
$table->integer('checkout_id');
$table->bigInteger('service_id')->nullable();
$table->binary('checkout_data', 65535)->nullable();
$table->float('checkout_amount', 10, 0)->nullable();
$table->string('notes', 128)->nullable();
$table->primary(['id','site_id','checkout_id']);
$table->unique(['site_id','service_id'], 'UNIQUE');
$table->index(['account_id','site_id'], 'fk_ab_a');
$table->index(['service_id','site_id'], 'fk_ab_s');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account_billing');
}
}

View File

@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountGroupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account_group', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_start')->nullable();
$table->bigInteger('date_expire')->nullable();
$table->integer('group_id')->default(0);
$table->bigInteger('account_id')->default(0);
$table->bigInteger('service_id')->nullable();
$table->boolean('active')->nullable();
$table->primary(['id','site_id','account_id','group_id']);
$table->unique(['site_id','group_id','account_id'], 'UNIQUE');
$table->index(['account_id','site_id'], 'fk_ag_acc_idx');
$table->index(['group_id','site_id'], 'fk_ag_grp_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account_group');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account_log', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('account_id')->default(0);
$table->string('ip', 32)->nullable();
$table->string('details', 256)->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_al_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account_log');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountMemoTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account_memo', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('staff_id')->nullable();
$table->bigInteger('account_id')->nullable()->index('account');
$table->string('type', 32)->nullable();
$table->string('memo')->nullable()->index('memo');
$table->string('misc', 32)->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account_memo');
}
}

View File

@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountOauthTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account_oauth', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('account_id');
$table->integer('oauth_id');
$table->string('userid', 128);
$table->binary('oauth_data', 65535)->nullable();
$table->primary(['id','site_id','account_id','oauth_id']);
$table->unique(['site_id','account_id','oauth_id'], 'UNIQUE');
$table->index(['oauth_id','site_id'], 'fk_ao_o_idx');
$table->index(['account_id','site_id'], 'fk_ao_a_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account_oauth');
}
}

View File

@ -1,59 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAccountTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_account', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_acc_set_idx');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('date_expire')->nullable();
$table->integer('language_id')->index('fk_acc_lan_idx');
$table->integer('country_id')->index('fk_acc_cty_idx');
$table->bigInteger('rtm_id')->nullable();
$table->integer('currency_id')->index('fk_acc_cur_idx');
$table->string('username', 128)->nullable();
$table->string('password', 128)->nullable();
$table->boolean('active')->nullable();
$table->string('first_name', 128)->nullable();
$table->string('last_name', 128)->nullable();
$table->string('title', 128)->nullable();
$table->string('email')->nullable();
$table->string('company')->nullable();
$table->string('address1', 128)->nullable();
$table->string('address2', 128)->nullable();
$table->string('city', 32)->nullable();
$table->string('state', 32)->nullable();
$table->string('zip', 16)->nullable();
$table->boolean('email_type')->nullable();
$table->integer('invoice_delivery')->nullable();
$table->string('mail_type')->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','username'], 'uq_username');
$table->index(['rtm_id','site_id'], 'fk_acc_rtm_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_account');
}
}

View File

@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAdslPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_adsl_plan', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('adsl_supplier_plan_id')->default(0);
$table->integer('contract_term')->nullable();
$table->float('base_down_peak', 10, 0)->nullable();
$table->float('base_up_peak', 10, 0)->nullable();
$table->float('base_down_offpeak', 10, 0)->nullable();
$table->float('base_up_offpeak', 10, 0)->nullable();
$table->boolean('extra_charged')->nullable();
$table->string('extra_shaped', 8)->nullable();
$table->float('extra_down_peak', 10, 0)->nullable();
$table->float('extra_up_peak', 10, 0)->nullable();
$table->float('extra_down_offpeak', 10, 0)->nullable();
$table->float('extra_up_offpeak', 10, 0)->nullable();
$table->float('metric', 10, 0)->default(0);
$table->primary(['id','site_id','adsl_supplier_plan_id']);
$table->index(['adsl_supplier_plan_id','site_id'], 'fk_ap_asp_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_adsl_plan');
}
}

View File

@ -1,58 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAdslSupplierPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_adsl_supplier_plan', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->integer('supplier_id')->default(0);
$table->string('product_id', 16)->nullable();
$table->string('product_desc', 128)->nullable();
$table->float('base_cost', 10, 0)->nullable();
$table->float('setup_cost', 10, 0)->nullable();
$table->integer('contract_term')->nullable();
$table->float('base_down_peak', 10, 0)->nullable();
$table->float('base_up_peak', 10, 0)->nullable();
$table->float('base_down_offpeak', 10, 0)->nullable();
$table->float('base_up_offpeak', 10, 0)->nullable();
$table->boolean('extra_charged')->nullable();
$table->string('extra_shaped', 8)->nullable();
$table->bigInteger('offpeak_start')->nullable();
$table->bigInteger('offpeak_end')->nullable();
$table->float('extra_down_peak', 10, 0)->nullable();
$table->float('extra_up_peak', 10, 0)->nullable();
$table->float('extra_down_offpeak', 10, 0)->nullable();
$table->float('extra_up_offpeak', 10, 0)->nullable();
$table->float('metric', 10, 0)->default(0);
$table->string('speed', 64)->nullable();
$table->primary(['id','site_id','supplier_id']);
$table->index(['supplier_id','site_id'], 'fk_asp_as_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_adsl_supplier_plan');
}
}

View File

@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAdslSupplierTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_adsl_supplier', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_as_set_idx');
$table->boolean('active')->nullable();
$table->boolean('debug')->nullable();
$table->string('name', 128)->nullable();
$table->string('notes')->nullable();
$table->string('provision_plugin', 128)->nullable();
$table->text('provision_plugin_data')->nullable();
$table->integer('max_accounts')->nullable();
$table->string('stats_url', 256)->nullable();
$table->date('stats_lastupdate')->nullable();
$table->string('stats_username', 16)->nullable();
$table->string('stats_password', 16)->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_adsl_supplier');
}
}

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAffiliateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_affiliate', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->bigInteger('account_id')->default(0);
$table->text('avail_campaign_id')->nullable();
$table->string('affiliate_plugin', 32)->nullable();
$table->string('parent_affiliate_id', 16)->nullable();
$table->integer('max_tiers')->nullable();
$table->float('commission_minimum', 10, 0)->nullable();
$table->boolean('new_commission_type')->nullable();
$table->text('new_commission_rate')->nullable();
$table->boolean('recurr_commission_type')->nullable();
$table->text('recurr_commission_rate')->nullable();
$table->integer('recurr_max_commission_periods')->nullable();
$table->text('plugin_data')->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_aff_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_affiliate');
}
}

View File

@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAssetPoolTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_asset_pool', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->string('name', 32)->nullable();
$table->unique(['site_id','id'], 'IDS');
$table->index(['id','site_id'], 'main');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_asset_pool');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAssetTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_asset', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->bigInteger('service_id')->nullable()->index('service');
$table->integer('pool_id')->nullable()->index('asso');
$table->string('asset', 128)->nullable()->index('asset');
$table->string('misc')->nullable();
$table->unique(['site_id','id'], 'IDS');
$table->index(['id','site_id'], 'assets');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_asset');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCartTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_cart', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->string('session_id', 32)->default('');
$table->integer('quantity')->nullable();
$table->integer('module_id')->default(0);
$table->integer('module_item')->default(0);
$table->text('module_data', 65535)->nullable();
$table->primary(['id','site_id']);
$table->index(['module_id','site_id'], 'fk_mod_crt_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_cart');
}
}

View File

@ -1,52 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbChargeTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_charge', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->boolean('processed')->nullable();
$table->integer('sweep_type')->nullable();
$table->integer('type')->nullable();
$table->bigInteger('account_id')->default(0);
$table->bigInteger('product_id')->nullable();
$table->bigInteger('service_id')->nullable();
$table->bigInteger('date_charge')->nullable();
$table->float('amount', 10, 0)->nullable();
$table->float('quantity', 10, 0)->nullable();
$table->boolean('taxable')->nullable();
$table->binary('attributes', 65535)->nullable();
$table->string('description', 128)->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_chg_acc_idx');
$table->index(['service_id','site_id'], 'fk_chg_svc_idx');
$table->index(['product_id','site_id'], 'fk_chg_pdt_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_charge');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCheckoutNotifyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_checkout_notify', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->integer('checkout_id');
$table->boolean('active')->nullable();
$table->binary('data', 65535);
$table->boolean('processed')->nullable();
$table->text('result', 65535)->nullable();
$table->primary(['id','site_id','checkout_id']);
$table->index(['checkout_id','site_id'], 'fk_cn_c_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_checkout_notify');
}
}

View File

@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCheckoutTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_checkout', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_cko_set_idx');
$table->boolean('active')->nullable();
$table->string('name', 32)->nullable();
$table->string('description')->nullable();
$table->string('plugin', 32)->nullable();
$table->text('plugin_data')->nullable();
$table->string('graphic_url', 128)->nullable();
$table->float('amount_min', 10, 0)->nullable()->default(0);
$table->float('amount_max', 10, 0)->nullable();
$table->float('fee_fixed', 10, 0)->nullable();
$table->float('fee_variable', 10, 0)->nullable();
$table->boolean('fee_passon')->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_checkout');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCountryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_country', function(Blueprint $table)
{
$table->integer('id')->default(0)->primary();
$table->string('name', 128)->nullable()->unique('name_UNIQUE');
$table->string('description', 128)->nullable();
$table->string('notes', 128)->nullable();
$table->string('two_code', 16)->nullable()->unique('two_code_UNIQUE');
$table->string('three_code', 16)->nullable()->unique('three_code_UNIQUE');
$table->boolean('active')->nullable();
$table->integer('currency_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_country');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCurrencyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_currency', function(Blueprint $table)
{
$table->integer('id')->default(0)->primary();
$table->integer('country_id')->nullable()->index('fk_cur_cty_idx');
$table->string('name', 128)->nullable();
$table->boolean('active')->nullable();
$table->text('convert_array')->nullable();
$table->string('notes', 128)->nullable();
$table->string('symbol', 16)->nullable();
$table->string('three_digit', 3)->nullable()->unique('three_digit_UNIQUE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_currency');
}
}

View File

@ -1,56 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbDiscountTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_discount', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->boolean('active')->nullable()->index('status');
$table->bigInteger('date_start')->nullable()->index('start');
$table->bigInteger('date_expire')->nullable()->index('expire');
$table->string('name', 64)->nullable();
$table->text('notes')->nullable();
$table->integer('max_usage_account')->nullable();
$table->integer('max_usage_global')->nullable();
$table->bigInteger('avail_account_id')->nullable();
$table->text('avail_product_id')->nullable();
$table->text('avail_group_id')->nullable();
$table->text('avail_tld_id')->nullable();
$table->boolean('new_status')->nullable();
$table->boolean('new_type')->nullable();
$table->float('new_rate', 10, 0)->nullable();
$table->float('new_max_discount', 10, 0)->nullable();
$table->float('new_min_cost', 10, 0)->nullable();
$table->boolean('recurr_status')->nullable();
$table->boolean('recurr_type')->nullable();
$table->float('recurr_rate', 10, 0)->nullable();
$table->float('recurr_max_discount', 10, 0)->nullable();
$table->float('recurr_min_cost', 10, 0)->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_discount');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbDomainRegistrarTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_domain_registrar', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_hrp_set');
$table->boolean('active')->nullable();
$table->string('name', 32)->nullable();
$table->string('file', 32)->nullable();
$table->string('whitelabel_url', 256)->nullable();
$table->string('whitelabel_ns', 1024)->nullable();
$table->string('manage_url', 256)->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_domain_registrar');
}
}

View File

@ -1,47 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbDomainTldTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_domain_tld', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->string('name', 128)->nullable();
$table->boolean('taxable')->nullable();
$table->string('whois_plugin', 32)->nullable();
$table->text('whois_plugin_data')->nullable();
$table->integer('registrar_plugin_id')->default(0);
$table->text('registrar_plugin_data')->nullable();
$table->boolean('auto_search')->nullable();
$table->integer('default_term_new')->nullable();
$table->text('price_group')->nullable();
$table->primary(['id','site_id','registrar_plugin_id']);
$table->index(['registrar_plugin_id','site_id'], 'fk_ht_hrp_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_domain_tld');
}
}

View File

@ -1,49 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbEmailLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_email_log', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('account_id')->default(0);
$table->bigInteger('email_template_translate_id')->nullable();
$table->string('email', 128)->nullable();
$table->string('subject', 128)->nullable();
$table->text('message')->nullable();
$table->boolean('html')->nullable();
$table->boolean('urgent')->nullable();
$table->boolean('userread')->nullable();
$table->binary('data', 65535)->nullable();
$table->integer('module_id')->nullable();
$table->string('module_data', 128)->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['email_template_translate_id','site_id'], 'fk_el_ett_idx');
$table->index(['account_id','site_id'], 'fk_el_acc_idx');
$table->index(['module_id','site_id'], 'fk_el_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_email_log');
}
}

View File

@ -1,52 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbEmailSetupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_email_setup', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('account_id')->default(0);
$table->string('name', 128)->nullable();
$table->text('notes')->nullable();
$table->boolean('type')->nullable();
$table->string('from_name', 128)->nullable();
$table->string('from_email', 128)->nullable();
$table->text('cc_list')->nullable();
$table->text('bcc_list')->nullable();
$table->string('server', 128)->nullable();
$table->string('username', 128)->nullable();
$table->string('password', 128)->nullable();
$table->string('piping', 4)->nullable();
$table->string('piping_host', 128)->nullable();
$table->string('piping_username', 128)->nullable();
$table->string('piping_password', 128)->nullable();
$table->string('piping_action', 4)->nullable();
$table->boolean('queue')->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_es_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_email_setup');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbEmailTemplateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_email_template', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->boolean('active')->nullable();
$table->integer('email_setup_id')->default(0);
$table->string('name', 128)->nullable();
$table->string('description', 32)->nullable();
$table->text('notes')->nullable();
$table->primary(['id','site_id','email_setup_id']);
$table->index(['email_setup_id','site_id'], 'fk_et_es_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_email_template');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbEmailTemplateTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_email_template_translate', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('email_template_id')->default(0);
$table->integer('language_id')->default(0)->index('fk_emt_lan_idx');
$table->string('subject');
$table->text('message_text');
$table->text('message_html')->nullable();
$table->primary(['id','site_id','email_template_id','language_id'],'pk_unique');
$table->index(['email_template_id','site_id'], 'fk_emt_et_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_email_template_translate');
}
}

View File

@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbExportDatamapTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_export_datamap', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('export_module_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('active')->nullable();
$table->bigInteger('item_id')->nullable();
$table->integer('module_id');
$table->binary('map_data', 65535)->nullable();
$table->primary(['id','site_id','export_module_id','module_id']);
$table->unique(['item_id','export_module_id','site_id'], 'UNIQUE');
$table->index(['export_module_id','site_id'], 'fk_edm_mod_idx');
$table->index(['module_id','site_id'], 'fk_edm_mod_idx1');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_export_datamap');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbExportItemTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_export_item', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('export_module_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('item_id')->default(0);
$table->string('reference', 64)->nullable();
$table->string('crc', 128)->nullable();
$table->primary(['id','site_id','export_module_id']);
$table->unique(['site_id','export_module_id','item_id'], 'UNIQUE');
$table->index(['export_module_id','site_id'], 'fk_exp_eit_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_export_item');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbExportModuleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_export_module', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('export_id')->default(0);
$table->integer('module_id')->default(0);
$table->binary('display', 65535)->nullable();
$table->primary(['id','site_id','export_id','module_id']);
$table->index(['export_id','site_id'], 'fk_exp_exm_idx');
$table->index(['module_id','site_id'], 'fk_exp_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_export_module');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbExportTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_export', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_exp_set_idx');
$table->string('name', 128)->default('');
$table->string('plugin', 128)->default('');
$table->boolean('active')->nullable();
$table->string('url', 128)->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','name'], 'UNIQUE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_export');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbGroupMethodTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_group_method', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->integer('method_id')->default(0);
$table->integer('group_id')->default(0);
$table->primary(['id','site_id','method_id','group_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['method_id','site_id'], 'fk_gm_mm_idx');
$table->index(['group_id','site_id'], 'fk_gm_grp_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_group_method');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbGroupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_group', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_grp_set_idx');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_start')->nullable();
$table->bigInteger('date_expire')->nullable();
$table->integer('parent_id')->nullable();
$table->boolean('active')->nullable();
$table->boolean('pricing')->nullable();
$table->string('name', 128)->nullable();
$table->text('notes')->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_group');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbHostServerAffiliateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_host_server_affiliate', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('affiliate_id');
$table->integer('host_server_id');
$table->string('host_username', 45)->nullable();
$table->string('host_password', 45)->nullable();
$table->primary(['id','site_id','affiliate_id','host_server_id'],'pk_unique');
$table->index(['affiliate_id','site_id'], 'fk_hsa_aff_idx');
$table->index(['host_server_id','site_id'], 'fk_hsa_hs_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_host_server_affiliate');
}
}

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbHostServerIdTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_host_server_id', function(Blueprint $table)
{
$table->integer('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_host_server_id');
}
}

View File

@ -1,46 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbHostServerTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_host_server', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->boolean('active')->nullable();
$table->boolean('debug')->nullable();
$table->string('name', 128)->nullable();
$table->string('notes')->nullable();
$table->string('provision_plugin', 128)->nullable();
$table->text('provision_plugin_data')->nullable();
$table->integer('max_accounts')->nullable();
$table->string('whitelabel_url', 256)->nullable();
$table->string('manage_url', 256)->nullable();
$table->string('manage_username', 45)->nullable();
$table->string('manage_password', 45)->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_host_server');
}
}

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbHostTldIdTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_host_tld_id', function(Blueprint $table)
{
$table->integer('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_host_tld_id');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbImportTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_import', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->string('plugin', 32)->nullable();
$table->string('action', 32)->nullable();
$table->string('remote_table', 32)->nullable();
$table->string('ab_table', 32)->nullable();
$table->bigInteger('remote_id')->nullable();
$table->bigInteger('ab_id')->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_import');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbInvoiceItemDiscountTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_invoice_item_discount', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable()->index('dates');
$table->bigInteger('invoice_id')->nullable();
$table->bigInteger('account_id')->nullable()->index('accounts');
$table->bigInteger('invoice_item_id')->nullable();
$table->string('discount', 64)->nullable()->index('discounts');
$table->float('amount', 10, 0)->nullable();
$table->unique(['site_id','id'], 'IDS');
$table->index(['invoice_id','invoice_item_id'], 'invoice_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_invoice_item_discount');
}
}

View File

@ -1,55 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbInvoiceItemTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_invoice_item', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('service_id')->nullable();
$table->bigInteger('invoice_id');
$table->boolean('active')->nullable();
$table->bigInteger('product_id')->nullable();
$table->integer('module_id')->nullable();
$table->bigInteger('module_ref')->nullable();
$table->float('quantity', 10, 0)->nullable();
$table->boolean('item_type')->nullable();
$table->string('product_name', 128)->nullable();
$table->float('discount_amt', 10, 0)->nullable();
$table->float('price_base', 10, 0)->nullable();
$table->integer('recurring_schedule')->nullable();
$table->bigInteger('date_start')->nullable();
$table->bigInteger('date_stop')->nullable();
$table->primary(['id','site_id','invoice_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['invoice_id','site_id'], 'fk_ii_inv_idx');
$table->index(['product_id','site_id'], 'fk_ii_pdt_idx');
$table->index(['service_id','site_id'], 'fk_ii_svc_idx');
$table->index(['module_id','site_id'], 'fk_ii_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_invoice_item');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbInvoiceItemTaxTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_invoice_item_tax', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('invoice_item_id')->default(0);
$table->integer('tax_id')->default(0)->index('fk_iit_tax_idx');
$table->float('amount', 10, 0)->default(0);
$table->primary(['id','site_id','invoice_item_id','tax_id']);
$table->index(['invoice_item_id','site_id'], 'fk_iit_ii_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_invoice_item_tax');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbInvoiceMemoTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_invoice_memo', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('invoice_id')->default(0);
$table->bigInteger('account_id')->nullable();
$table->string('type', 32)->nullable();
$table->binary('memo', 65535)->nullable();
$table->primary(['id','site_id','invoice_id']);
$table->index(['invoice_id','site_id'], 'fk_im_inv_idx');
$table->index(['account_id','site_id'], 'fk_im_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_invoice_memo');
}
}

View File

@ -1,46 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbInvoiceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_invoice', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('process_status')->nullable();
$table->boolean('billing_status')->nullable();
$table->boolean('print_status')->nullable();
$table->bigInteger('account_id')->default(0);
$table->integer('account_billing_id')->nullable();
$table->float('discount_amt', 10, 0)->nullable();
$table->bigInteger('due_date')->nullable();
$table->boolean('active')->nullable();
$table->binary('reminders', 65535)->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_inv_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_invoice');
}
}

View File

@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbLanguageTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_language', function(Blueprint $table)
{
$table->integer('id')->primary();
$table->string('name', 45)->nullable()->unique('name_UNIQUE');
$table->string('iso', 5)->nullable()->unique('iso_UNIQUE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_language');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbLogErrorTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_log_error', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('account_id')->nullable();
$table->string('module', 64)->nullable();
$table->string('method', 64)->nullable();
$table->text('message')->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_log_error');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbModuleMethodTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_module_method', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->integer('module_id')->default(0);
$table->string('name', 64)->nullable()->default('');
$table->string('notes', 128)->nullable();
$table->string('menu_display', 32)->nullable();
$table->primary(['id','site_id','module_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->unique(['site_id','module_id','name'], 'UNIQUE2');
$table->index(['module_id','site_id'], 'fk_mm_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_module_method');
}
}

View File

@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbModuleMethodTokenTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_module_method_token', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->integer('method_id')->default(0);
$table->bigInteger('account_id')->default(0);
$table->string('token', 36)->default('');
$table->bigInteger('date_orig')->default(0);
$table->bigInteger('date_last')->nullable();
$table->bigInteger('date_expire')->nullable();
$table->string('uses', 45)->nullable();
$table->primary(['id','site_id','method_id','account_id']);
$table->index(['method_id','site_id'], 'fk_mmt_mm_idx');
$table->index(['account_id','site_id'], 'fk_mmt_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_module_method_token');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbModuleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_module', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_mod_set_idx');
$table->string('name', 128)->default('');
$table->bigInteger('date_orig')->nullable();
$table->boolean('active')->nullable();
$table->integer('parent_id')->nullable();
$table->text('notes')->nullable();
$table->boolean('external')->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','name'], 'UNIQUE');
$table->index(['parent_id','site_id'], 'fk_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_module');
}
}

View File

@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbOauthTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_oauth', function(Blueprint $table)
{
$table->integer('id');
$table->integer('site_id')->index('fk_o_set_idx');
$table->boolean('active')->nullable();
$table->string('name', 32);
$table->string('app_id', 128)->nullable();
$table->string('secret', 128)->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_oauth');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbPaymentItemTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_payment_item', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('payment_id')->default(0);
$table->bigInteger('invoice_id')->nullable();
$table->float('alloc_amt', 10, 0)->nullable();
$table->primary(['id','payment_id','site_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['payment_id','site_id'], 'fk_pi_pay_idx');
$table->index(['invoice_id','site_id'], 'fk_pi_inv_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_payment_item');
}
}

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbPaymentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_payment', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('account_id')->default(0);
$table->bigInteger('date_payment')->nullable();
$table->integer('checkout_id')->default(0);
$table->string('checkout_data')->nullable();
$table->float('total_amt', 10, 0)->nullable();
$table->float('fees_amt', 10, 0)->nullable();
$table->bigInteger('source_id')->nullable();
$table->boolean('pending_status')->nullable();
$table->text('notes', 65535)->nullable();
$table->string('ip', 32)->nullable();
$table->primary(['id','checkout_id','account_id','site_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['account_id','site_id'], 'fk_pay_acc_idx');
$table->index(['checkout_id','site_id'], 'fk_pay_cp_idx');
$table->index(['source_id','site_id'], 'fk_pay_acc_b_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_payment');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbPivotProductCatTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_pivot_product_cat', function(Blueprint $table)
{
$table->bigInteger('id', false);
$table->integer('site_id');
$table->bigInteger('product_id')->nullable();
$table->integer('product_cat_id')->nullable();
$table->primary(['id','site_id']);
$table->unique(['site_id','product_id','product_cat_id'], 'UNIQUE');
$table->index(['product_cat_id','site_id'], 'fk_pc_idx');
$table->index(['product_id','site_id'], 'fk_p_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_pivot_product_cat');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbProductCatTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_product_cat', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_pc_set_idx');
$table->integer('parent_id')->nullable()->index('fk_pc_pc_idx');
$table->binary('group_avail', 65535)->nullable();
$table->binary('notes', 65535)->nullable();
$table->boolean('active')->nullable();
$table->string('template', 128)->nullable();
$table->integer('position')->nullable();
$table->integer('recur_schedule')->default(0);
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_product_cat');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbProductCatTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_product_cat_translate', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->integer('product_cat_id')->default(0);
$table->integer('language_id')->default(0)->index('fk_pct_lan_idx');
$table->string('name', 128)->nullable();
$table->binary('description', 65535)->nullable();
$table->primary(['id','site_id','product_cat_id','language_id'],'pk_unique');
$table->unique(['site_id','product_cat_id','language_id'], 'UNIQUE');
$table->index(['product_cat_id','site_id'], 'fk_pct_pc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_product_cat_translate');
}
}

View File

@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbProductTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_product', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_pdt_set_idx');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->boolean('taxable')->nullable();
$table->boolean('active')->nullable();
$table->boolean('position')->nullable();
$table->boolean('cart_multiple')->nullable();
$table->binary('group_avail', 65535)->nullable();
$table->binary('avail_category', 65535)->nullable();
$table->boolean('price_type')->nullable();
$table->binary('price_group', 65535)->nullable();
$table->boolean('price_recurr_default')->nullable();
$table->boolean('price_recurr_day')->nullable();
$table->boolean('price_recurr_weekday')->nullable();
$table->boolean('price_recurr_strict')->nullable();
$table->string('prod_plugin_file', 128)->nullable();
$table->binary('prod_plugin_data', 65535)->nullable();
$table->string('accounting', 64)->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_product');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbProductTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_product_translate', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('product_id')->default(0);
$table->integer('language_id')->default(0)->index('fk_pt_l_idx');
$table->string('name', 128)->nullable();
$table->text('description_short')->nullable();
$table->binary('description_full', 65535)->nullable();
$table->primary(['id','site_id','product_id','language_id']);
$table->unique(['product_id','language_id','site_id'], 'UNIQUE');
$table->index(['site_id','product_id'], 'fk_pt_p_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_product_translate');
}
}

View File

@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbRecordIdTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_record_id', function(Blueprint $table)
{
$table->integer('site_id')->default(0)->index('fk_rid_set_idx');
$table->integer('module_id')->default(0);
$table->integer('id')->default(0);
$table->primary(['site_id','module_id']);
$table->index(['module_id','site_id'], 'fk_rid_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_record_id');
}
}

View File

@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbRtmTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_rtm', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('account_id')->default(0);
$table->string('name', 64)->default('')->unique('uq_name');
$table->bigInteger('parent_id')->nullable()->index('fk_rtm_acc_p_idx');
$table->primary(['id','site_id','account_id']);
$table->index(['account_id','site_id'], 'fk_rtm_set_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_rtm');
}
}

View File

@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceAdslTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__adsl', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('service_id')->default(0);
$table->bigInteger('provided_adsl_plan_id')->nullable();
$table->string('service_number', 10)->default('')->index('fk_service_number');
$table->string('service_address', 128)->nullable();
$table->integer('contract_term')->nullable();
$table->bigInteger('service_connect_date')->nullable();
$table->bigInteger('service_contract_date')->nullable();
$table->string('service_username', 128)->nullable()->unique('uq_service_username');
$table->string('service_password', 16)->nullable();
$table->boolean('service_stats_collect')->nullable();
$table->date('service_stats_lastupdate')->nullable();
$table->string('ipaddress', 45)->nullable();
$table->time('offpeak_start')->nullable();
$table->time('offpeak_end')->nullable();
$table->primary(['id','site_id','service_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['service_id','site_id'], 'fk_sa_svc_idx');
$table->index(['provided_adsl_plan_id','site_id'], 'fk_sa_ap_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__adsl');
}
}

View File

@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceAdslTrafficTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__adsl_traffic', function(Blueprint $table)
{
$table->integer('site_id')->default(0);
$table->date('date')->index('in_sat_DATE');
$table->string('service', 128)->index('in_sat_SERVICE');
$table->integer('supplier_id');
$table->integer('up_peak')->nullable();
$table->integer('up_offpeak')->nullable();
$table->integer('down_peak')->nullable();
$table->integer('down_offpeak')->nullable();
$table->integer('peer')->nullable();
$table->integer('internal')->nullable();
$table->time('time')->nullable();
$table->index(['service','date'], 'in_sat_SERVICE_DATE');
$table->index(['supplier_id','site_id'], 'fk_sat_as_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__adsl_traffic');
}
}

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceDomainTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__domain', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('service_id')->default(0);
$table->integer('domain_tld_id')->default(0);
$table->integer('domain_registrar_id')->default(0);
$table->string('domain_name', 128)->nullable();
$table->bigInteger('domain_expire')->nullable();
$table->string('registrar_type', 16)->nullable();
$table->string('registrar_username', 128)->nullable();
$table->string('registrar_password', 128)->nullable();
$table->string('registrar_auth_password', 128)->nullable();
$table->string('registrar_pending_transfer', 16)->nullable();
$table->string('registrar_ns', 1024)->nullable();
$table->bigInteger('registrar_lastsync')->nullable();
$table->primary(['id','site_id','service_id','domain_tld_id','domain_registrar_id'],'pk_unique');
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['service_id','site_id'], 'fk_sd_svc_idx');
$table->index(['domain_registrar_id','site_id'], 'fk_sd_hrp_idx');
$table->index(['domain_tld_id','site_id'], 'fk_sd_ht_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__domain');
}
}

View File

@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceHostingTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__hosting', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('service_id')->default(0);
$table->integer('domain_tld_id')->default(0);
$table->integer('host_server_id')->default(0);
$table->string('domain_name', 128)->nullable();
$table->bigInteger('host_expire')->nullable();
$table->string('host_type', 16)->nullable();
$table->string('host_username', 45)->nullable();
$table->string('host_password', 45)->nullable();
$table->string('ftp_username', 16)->nullable();
$table->string('ftp_password', 16)->nullable();
$table->binary('server_data', 65535)->nullable();
$table->text('server_data_date', 65535)->nullable();
$table->primary(['id','site_id','service_id','domain_tld_id','host_server_id'],'pk_unique');
$table->unique(['id','site_id'], 'UNIQUE');
$table->unique(['host_server_id','ftp_username'], 'uq_ftp_username');
$table->index(['service_id','site_id'], 'fk_service_id');
$table->index(['domain_tld_id','site_id'], 'fk_domain_tld_id');
$table->index(['host_server_id','site_id'], 'fk_sh_hs_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__hosting');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceSslTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__ssl', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('service_id');
$table->bigInteger('ssl_ca_id')->nullable();
$table->text('csr', 65535);
$table->text('pk', 65535)->nullable();
$table->text('cert', 65535)->nullable();
$table->primary(['id','service_id','site_id']);
$table->unique(['id','site_id'], 'UNIQUE');
$table->index(['service_id','site_id'], 'fk_ss_svc_idx');
$table->index(['ssl_ca_id','site_id'], 'fk_ss_sca_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__ssl');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceVoipTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service__voip', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('service_id')->nullable();
$table->string('service_number', 10)->nullable();
$table->string('service_address', 128)->nullable();
$table->integer('contract_term')->nullable();
$table->bigInteger('service_connect_date')->nullable();
$table->bigInteger('service_contract_date')->nullable();
$table->string('service_username', 128)->nullable();
$table->string('service_password', 32)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service__voip');
}
}

View File

@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceChangeTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service_change', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('service_id');
$table->bigInteger('product_id');
$table->bigInteger('ordered_by');
$table->bigInteger('date_ordered')->nullable();
$table->bigInteger('date_effective')->nullable();
$table->boolean('active')->nullable();
$table->boolean('complete')->nullable();
$table->primary(['id','site_id','service_id','product_id','ordered_by'],'pk_unique');
$table->index(['site_id','id'], 'fk_s_sc_idx');
$table->index(['site_id','product_id'], 'fk_s_p_idx');
$table->index(['site_id','ordered_by'], 'fk_sc_a_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service_change');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceMemoTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service_memo', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('service_id')->default(0);
$table->bigInteger('account_id')->nullable();
$table->string('type', 32)->nullable();
$table->binary('memo', 65535)->nullable();
$table->primary(['id','site_id','service_id']);
$table->index(['service_id','site_id'], 'fk_sm_svc_idx');
$table->index(['account_id','site_id'], 'fk_sm_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service_memo');
}
}

View File

@ -1,56 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbServiceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_service', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('account_id')->default(0);
$table->bigInteger('account_billing_id')->nullable();
$table->bigInteger('product_id')->nullable();
$table->boolean('active')->nullable();
$table->boolean('suspend_billing')->nullable();
$table->boolean('external_billing')->nullable();
$table->float('price', 10, 0)->nullable();
$table->integer('price_group')->default(0);
$table->float('price_override', 10, 0)->nullable();
$table->boolean('taxable')->nullable();
$table->string('queue', 16)->nullable();
$table->bigInteger('date_last_invoice')->nullable();
$table->bigInteger('date_next_invoice')->nullable();
$table->integer('recur_schedule')->nullable();
$table->text('prod_attr')->nullable();
$table->bigInteger('date_start')->nullable();
$table->bigInteger('date_end')->nullable();
$table->primary(['id','site_id','price_group']);
$table->unique(['site_id','id','account_id'], 'UNIQUE');
$table->index(['account_id','site_id'], 'fk_svc_acc_idx');
$table->index(['site_id','price_group'], 'fk_svc_grp_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_service');
}
}

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbSetupInvoiceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_setup_invoice', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->boolean('bill_to_company')->nullable();
$table->string('invoice_currency', 8)->nullable();
$table->integer('invoice_decimals')->nullable();
$table->integer('items_summary_max')->nullable();
$table->text('news', 65535)->nullable();
$table->string('page_type', 8)->nullable();
$table->integer('invoice_delivery')->nullable();
$table->boolean('invoice_show_itemized')->nullable();
$table->boolean('invoice_show_service_dates')->nullable();
$table->integer('invoice_grace')->nullable();
$table->integer('invoice_advance_gen')->nullable();
$table->integer('invoice_terms')->nullable();
$table->string('invoice_pdf_plugin', 16)->nullable();
$table->string('contact_us_url', 64)->nullable();
$table->string('contact_us_phone', 64)->nullable();
$table->integer('advance_notice')->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_setup_invoice');
}
}

View File

@ -1,47 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbSetupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_setup', function(Blueprint $table)
{
$table->integer('id');
$table->bigInteger('date_orig')->nullable();
$table->boolean('active')->nullable();
$table->integer('country_id')->index('fk_set_cty_idx');
$table->integer('language_id')->index('fk_set_lan_idx');
$table->integer('currency_id')->index('fk_set_cur_idx');
$table->string('url', 256)->default('');
$table->integer('login_expire')->nullable();
$table->text('time_format', 65535)->nullable();
$table->text('date_format', 65535)->nullable();
$table->integer('decimal_place')->nullable();
$table->binary('module_config', 65535)->nullable();
$table->binary('site_details', 65535)->nullable();
$table->bigInteger('admin_id')->nullable();
$table->primary(['id','country_id','currency_id','url']);
$table->index(['admin_id','id'], 'fk_set_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_setup');
}
}

View File

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbSslCaTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_ssl_ca', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id');
$table->bigInteger('account_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->boolean('active')->nullable();
$table->text('sign_pk', 65535);
$table->text('sign_cert', 65535);
$table->bigInteger('parent_ssl_ca_id')->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['parent_ssl_ca_id','site_id'], 'fk_sca_idx');
$table->index(['account_id','site_id'], 'fk_sca_acc_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_ssl_ca');
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbSslTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_ssl', function(Blueprint $table)
{
$table->bigInteger('id');
$table->integer('site_id')->index('fk_ssl_set_idx');
$table->string('extensions', 64);
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_ssl');
}
}

View File

@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbStaticPageCategoryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_static_page_category', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->string('group_avail')->nullable();
$table->string('name', 128)->nullable()->index('name');
$table->text('description')->nullable();
$table->boolean('active')->nullable()->index('status');
$table->integer('sort_order')->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_static_page_category');
}
}

View File

@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbStaticPageTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_static_page', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->integer('static_page_category_id')->nullable()->index('cat');
$table->bigInteger('date_start')->nullable()->index('start');
$table->bigInteger('date_expire')->nullable()->index('expire');
$table->integer('sort_order')->nullable();
$table->boolean('active')->nullable();
$table->string('name', 128)->nullable()->index('name');
$table->text('description')->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_static_page');
}
}

View File

@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbStaticPageTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_static_page_translate', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->integer('static_page_id')->nullable();
$table->string('language_id', 16)->nullable();
$table->text('body_intro')->nullable();
$table->text('body_full')->nullable();
$table->string('title', 128)->nullable();
$table->unique(['site_id','id'], 'IDS');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_static_page_translate');
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbTaskLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_task_log', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('task_id')->default(0);
$table->boolean('result')->nullable();
$table->binary('message', 65535)->nullable();
$table->primary(['id','site_id','task_id']);
$table->index(['task_id','site_id'], 'fk_tl_task');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_task_log');
}
}

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbTaskTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_task', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_tsk_set_idx');
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->bigInteger('date_run')->nullable();
$table->integer('active')->nullable();
$table->string('name', 32)->nullable();
$table->string('description')->nullable();
$table->boolean('log')->nullable();
$table->integer('type')->nullable();
$table->string('command', 128)->nullable();
$table->string('int_min', 32)->nullable();
$table->string('int_hour', 32)->nullable();
$table->string('int_month', 32)->nullable();
$table->string('int_month_day', 32)->nullable();
$table->string('int_week_day', 32)->nullable();
$table->boolean('running')->nullable();
$table->string('running_host', 4)->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_task');
}
}

View File

@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbTaxTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_tax', function(Blueprint $table)
{
$table->integer('id')->default(0)->primary();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->integer('country_id')->default(0)->index('fk_tax_cty_idx');
$table->string('zone', 128)->nullable();
$table->string('description')->nullable();
$table->float('rate', 10, 0)->nullable();
$table->boolean('tax_id_collect')->nullable();
$table->string('tax_id_name', 32)->nullable();
$table->boolean('tax_id_req')->nullable();
$table->boolean('tax_id_exempt')->nullable();
$table->string('tax_id_regex')->nullable();
$table->unique(['country_id','zone'], 'UNIQUE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_tax');
}
}

View File

@ -1,33 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbVoipPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_voip_plan', function(Blueprint $table)
{
$table->bigInteger('id')->nullable();
$table->integer('site_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_voip_plan');
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCountriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->string('twocode', 2)->nullable();
$table->string('threecode', 3);
$table->integer('currency_id')->unsigned()->nullable()->index('countries_currency_id_foreign');
$table->boolean('active');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('countries');
}
}

View File

@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCurrenciesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currencies', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->string('symbol', 2)->nullable();
$table->string('threecode', 3);
$table->boolean('active');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('currencies');
}
}

View File

@ -1,49 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('site_id');
$table->string('email', 191);
$table->string('password', 191)->nullable();
$table->string('remember_token', 100)->nullable();
$table->boolean('active');
$table->string('title', 191)->nullable();
$table->string('firstname', 191);
$table->string('lastname', 191);
$table->integer('country_id');
$table->string('address1', 191)->nullable();
$table->string('address2', 191)->nullable();
$table->string('city', 191)->nullable();
$table->string('state', 191)->nullable();
$table->string('postcode', 191)->nullable();
$table->boolean('emailable')->default(1);
$table->unique(['site_id','email']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAccountBillingTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_account_billing', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_ab_a')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('service_id', 'fk_ab_s')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_account_billing', function(Blueprint $table)
{
$table->dropForeign('fk_ab_a');
$table->dropForeign('fk_ab_s');
});
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAccountGroupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_account_group', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_ag_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('group_id', 'fk_ag_grp')->references('id')->on('ab_group')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_account_group', function(Blueprint $table)
{
$table->dropForeign('fk_ag_acc');
$table->dropForeign('fk_ag_grp');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAccountLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_account_log', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_al_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_account_log', function(Blueprint $table)
{
$table->dropForeign('fk_al_acc');
});
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAccountOauthTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_account_oauth', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_ao_a')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('oauth_id', 'fk_ao_o')->references('id')->on('ab_oauth')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_account_oauth', function(Blueprint $table)
{
$table->dropForeign('fk_ao_a');
$table->dropForeign('fk_ao_o');
});
}
}

View File

@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAccountTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_account', function(Blueprint $table)
{
$table->foreign('country_id', 'fk_acc_cty')->references('id')->on('ab_country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('currency_id', 'fk_acc_cur')->references('id')->on('ab_currency')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('language_id', 'fk_acc_lan')->references('id')->on('ab_language')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('rtm_id', 'fk_acc_rtm')->references('id')->on('ab_rtm')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('site_id', 'fk_acc_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_account', function(Blueprint $table)
{
$table->dropForeign('fk_acc_cty');
$table->dropForeign('fk_acc_cur');
$table->dropForeign('fk_acc_lan');
$table->dropForeign('fk_acc_rtm');
$table->dropForeign('fk_acc_set');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAdslPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_adsl_plan', function(Blueprint $table)
{
$table->foreign('adsl_supplier_plan_id', 'fk_ap_asp')->references('id')->on('ab_adsl_supplier_plan')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_adsl_plan', function(Blueprint $table)
{
$table->dropForeign('fk_ap_asp');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAdslSupplierPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_adsl_supplier_plan', function(Blueprint $table)
{
$table->foreign('supplier_id', 'fk_asp_as')->references('id')->on('ab_adsl_supplier')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_adsl_supplier_plan', function(Blueprint $table)
{
$table->dropForeign('fk_asp_as');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAdslSupplierTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_adsl_supplier', function(Blueprint $table)
{
$table->foreign('site_id', 'fk_as_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_adsl_supplier', function(Blueprint $table)
{
$table->dropForeign('fk_as_set');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbAffiliateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_affiliate', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_aff_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_affiliate', function(Blueprint $table)
{
$table->dropForeign('fk_aff_acc');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbCartTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_cart', function(Blueprint $table)
{
$table->foreign('module_id', 'fk_mod_crt')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_cart', function(Blueprint $table)
{
$table->dropForeign('fk_mod_crt');
});
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbChargeTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_charge', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_chg_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('product_id', 'fk_chg_pdt')->references('id')->on('ab_product')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('service_id', 'fk_chg_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_charge', function(Blueprint $table)
{
$table->dropForeign('fk_chg_acc');
$table->dropForeign('fk_chg_pdt');
$table->dropForeign('fk_chg_svc');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbCheckoutNotifyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_checkout_notify', function(Blueprint $table)
{
$table->foreign('checkout_id', 'fk_cn_c')->references('id')->on('ab_checkout')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_checkout_notify', function(Blueprint $table)
{
$table->dropForeign('fk_cn_c');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbCheckoutTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_checkout', function(Blueprint $table)
{
$table->foreign('site_id', 'fk_cko_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_checkout', function(Blueprint $table)
{
$table->dropForeign('fk_cko_set');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbCurrencyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_currency', function(Blueprint $table)
{
$table->foreign('country_id', 'fk_cur_cty')->references('id')->on('ab_country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_currency', function(Blueprint $table)
{
$table->dropForeign('fk_cur_cty');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbDomainTldTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_domain_tld', function(Blueprint $table)
{
$table->foreign('registrar_plugin_id', 'fk_ht_hrp')->references('id')->on('ab_domain_registrar')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_domain_tld', function(Blueprint $table)
{
$table->dropForeign('fk_ht_hrp');
});
}
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbEmailLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_email_log', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_el_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('email_template_translate_id', 'fk_el_ett')->references('id')->on('ab_email_template_translate')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('module_id', 'fk_el_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_email_log', function(Blueprint $table)
{
$table->dropForeign('fk_el_acc');
$table->dropForeign('fk_el_ett');
$table->dropForeign('fk_el_mod');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbEmailSetupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_email_setup', function(Blueprint $table)
{
$table->foreign('account_id', 'fk_es_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_email_setup', function(Blueprint $table)
{
$table->dropForeign('fk_es_acc');
});
}
}

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbEmailTemplateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_email_template', function(Blueprint $table)
{
$table->foreign('email_setup_id', 'fk_et_es')->references('id')->on('ab_email_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_email_template', function(Blueprint $table)
{
$table->dropForeign('fk_et_es');
});
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToAbEmailTemplateTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ab_email_template_translate', function(Blueprint $table)
{
$table->foreign('email_template_id', 'fk_emt_et')->references('id')->on('ab_email_template')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('language_id', 'fk_emt_lan')->references('id')->on('ab_language')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ab_email_template_translate', function(Blueprint $table)
{
$table->dropForeign('fk_emt_et');
$table->dropForeign('fk_emt_lan');
});
}
}

Some files were not shown because too many files have changed in this diff Show More