diff --git a/.gitlab-test.yml b/.gitlab-test.yml index 0145f01..16ba0b6 100644 --- a/.gitlab-test.yml +++ b/.gitlab-test.yml @@ -28,6 +28,9 @@ test: - if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.config/composer/auth.json ; fi - composer install + # Add mysql client for schema pre-load + - apt update && apt install -f mariadb-client + # Generate an application key. Re-cache. - php artisan key:generate --env=testing - php artisan config:cache --env=testing diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index 0d5cb84..0000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('password_resets'); - } -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_billing_table.php b/database/migrations/2017_06_18_104531_create_ab_account_billing_table.php deleted file mode 100644 index dfed481..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_billing_table.php +++ /dev/null @@ -1,43 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_group_table.php b/database/migrations/2017_06_18_104531_create_ab_account_group_table.php deleted file mode 100644 index 2705157..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_group_table.php +++ /dev/null @@ -1,44 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_log_table.php b/database/migrations/2017_06_18_104531_create_ab_account_log_table.php deleted file mode 100644 index 7b8d52f..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_log_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_memo_table.php b/database/migrations/2017_06_18_104531_create_ab_account_memo_table.php deleted file mode 100644 index 49634c7..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_memo_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_oauth_table.php b/database/migrations/2017_06_18_104531_create_ab_account_oauth_table.php deleted file mode 100644 index 7f48869..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_oauth_table.php +++ /dev/null @@ -1,43 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_account_table.php b/database/migrations/2017_06_18_104531_create_ab_account_table.php deleted file mode 100644 index 94fdd27..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_account_table.php +++ /dev/null @@ -1,59 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_adsl_plan_table.php b/database/migrations/2017_06_18_104531_create_ab_adsl_plan_table.php deleted file mode 100644 index 635ab2c..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_adsl_plan_table.php +++ /dev/null @@ -1,48 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_plan_table.php b/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_plan_table.php deleted file mode 100644 index 2e20fdb..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_plan_table.php +++ /dev/null @@ -1,58 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_table.php b/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_table.php deleted file mode 100644 index 830f1a5..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_table.php +++ /dev/null @@ -1,45 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_affiliate_table.php b/database/migrations/2017_06_18_104531_create_ab_affiliate_table.php deleted file mode 100644 index f1d2e30..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_affiliate_table.php +++ /dev/null @@ -1,50 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_asset_pool_table.php b/database/migrations/2017_06_18_104531_create_ab_asset_pool_table.php deleted file mode 100644 index 6328fce..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_asset_pool_table.php +++ /dev/null @@ -1,36 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_asset_table.php b/database/migrations/2017_06_18_104531_create_ab_asset_table.php deleted file mode 100644 index 3149ef3..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_asset_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_cart_table.php b/database/migrations/2017_06_18_104531_create_ab_cart_table.php deleted file mode 100644 index dcf5947..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_cart_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_charge_table.php b/database/migrations/2017_06_18_104531_create_ab_charge_table.php deleted file mode 100644 index f9e3c85..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_charge_table.php +++ /dev/null @@ -1,52 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_checkout_notify_table.php b/database/migrations/2017_06_18_104531_create_ab_checkout_notify_table.php deleted file mode 100644 index 37f19b5..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_checkout_notify_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_checkout_table.php b/database/migrations/2017_06_18_104531_create_ab_checkout_table.php deleted file mode 100644 index 3454a42..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_checkout_table.php +++ /dev/null @@ -1,45 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_country_table.php b/database/migrations/2017_06_18_104531_create_ab_country_table.php deleted file mode 100644 index 254ed4b..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_country_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_currency_table.php b/database/migrations/2017_06_18_104531_create_ab_currency_table.php deleted file mode 100644 index a8f0430..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_currency_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_discount_table.php b/database/migrations/2017_06_18_104531_create_ab_discount_table.php deleted file mode 100644 index 0dd4140..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_discount_table.php +++ /dev/null @@ -1,56 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_domain_registrar_table.php b/database/migrations/2017_06_18_104531_create_ab_domain_registrar_table.php deleted file mode 100644 index 3da9c83..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_domain_registrar_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_domain_tld_table.php b/database/migrations/2017_06_18_104531_create_ab_domain_tld_table.php deleted file mode 100644 index e09ae60..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_domain_tld_table.php +++ /dev/null @@ -1,47 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_email_log_table.php b/database/migrations/2017_06_18_104531_create_ab_email_log_table.php deleted file mode 100644 index 02d9a9c..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_email_log_table.php +++ /dev/null @@ -1,49 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_email_setup_table.php b/database/migrations/2017_06_18_104531_create_ab_email_setup_table.php deleted file mode 100644 index 248bb48..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_email_setup_table.php +++ /dev/null @@ -1,52 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_email_template_table.php b/database/migrations/2017_06_18_104531_create_ab_email_template_table.php deleted file mode 100644 index 516f6fc..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_email_template_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_email_template_translate_table.php b/database/migrations/2017_06_18_104531_create_ab_email_template_translate_table.php deleted file mode 100644 index 5f174f0..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_email_template_translate_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_export_datamap_table.php b/database/migrations/2017_06_18_104531_create_ab_export_datamap_table.php deleted file mode 100644 index cacb78b..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_export_datamap_table.php +++ /dev/null @@ -1,44 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_export_item_table.php b/database/migrations/2017_06_18_104531_create_ab_export_item_table.php deleted file mode 100644 index 5f29c4c..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_export_item_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_export_module_table.php b/database/migrations/2017_06_18_104531_create_ab_export_module_table.php deleted file mode 100644 index 58e7cd9..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_export_module_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_export_table.php b/database/migrations/2017_06_18_104531_create_ab_export_table.php deleted file mode 100644 index a2c9c29..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_export_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_group_method_table.php b/database/migrations/2017_06_18_104531_create_ab_group_method_table.php deleted file mode 100644 index fe09e89..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_group_method_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_group_table.php b/database/migrations/2017_06_18_104531_create_ab_group_table.php deleted file mode 100644 index 2e22cc5..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_group_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_host_server_affiliate_table.php b/database/migrations/2017_06_18_104531_create_ab_host_server_affiliate_table.php deleted file mode 100644 index 41e45cd..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_host_server_affiliate_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_host_server_id_table.php b/database/migrations/2017_06_18_104531_create_ab_host_server_id_table.php deleted file mode 100644 index 102bfb1..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_host_server_id_table.php +++ /dev/null @@ -1,32 +0,0 @@ -integer('id'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('ab_host_server_id'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_host_server_table.php b/database/migrations/2017_06_18_104531_create_ab_host_server_table.php deleted file mode 100644 index 8aec3f4..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_host_server_table.php +++ /dev/null @@ -1,46 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_host_tld_id_table.php b/database/migrations/2017_06_18_104531_create_ab_host_tld_id_table.php deleted file mode 100644 index f7c0ea9..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_host_tld_id_table.php +++ /dev/null @@ -1,32 +0,0 @@ -integer('id'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('ab_host_tld_id'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_import_table.php b/database/migrations/2017_06_18_104531_create_ab_import_table.php deleted file mode 100644 index 633b521..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_import_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_invoice_item_discount_table.php b/database/migrations/2017_06_18_104531_create_ab_invoice_item_discount_table.php deleted file mode 100644 index 9c6b991..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_invoice_item_discount_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_invoice_item_table.php b/database/migrations/2017_06_18_104531_create_ab_invoice_item_table.php deleted file mode 100644 index d47e144..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_invoice_item_table.php +++ /dev/null @@ -1,55 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_invoice_item_tax_table.php b/database/migrations/2017_06_18_104531_create_ab_invoice_item_tax_table.php deleted file mode 100644 index f0100a5..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_invoice_item_tax_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_invoice_memo_table.php b/database/migrations/2017_06_18_104531_create_ab_invoice_memo_table.php deleted file mode 100644 index 908142d..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_invoice_memo_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_invoice_table.php b/database/migrations/2017_06_18_104531_create_ab_invoice_table.php deleted file mode 100644 index 5e02c19..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_invoice_table.php +++ /dev/null @@ -1,46 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_language_table.php b/database/migrations/2017_06_18_104531_create_ab_language_table.php deleted file mode 100644 index c7fd611..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_language_table.php +++ /dev/null @@ -1,34 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_log_error_table.php b/database/migrations/2017_06_18_104531_create_ab_log_error_table.php deleted file mode 100644 index f0df10a..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_log_error_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_module_method_table.php b/database/migrations/2017_06_18_104531_create_ab_module_method_table.php deleted file mode 100644 index 84ed63d..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_module_method_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_module_method_token_table.php b/database/migrations/2017_06_18_104531_create_ab_module_method_token_table.php deleted file mode 100644 index 58b20b6..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_module_method_token_table.php +++ /dev/null @@ -1,43 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_module_table.php b/database/migrations/2017_06_18_104531_create_ab_module_table.php deleted file mode 100644 index c042374..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_module_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_oauth_table.php b/database/migrations/2017_06_18_104531_create_ab_oauth_table.php deleted file mode 100644 index 3e66318..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_oauth_table.php +++ /dev/null @@ -1,38 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_payment_item_table.php b/database/migrations/2017_06_18_104531_create_ab_payment_item_table.php deleted file mode 100644 index 03b7ddc..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_payment_item_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_payment_table.php b/database/migrations/2017_06_18_104531_create_ab_payment_table.php deleted file mode 100644 index 3d5f971..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_payment_table.php +++ /dev/null @@ -1,50 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_pivot_product_cat_table.php b/database/migrations/2017_06_18_104531_create_ab_pivot_product_cat_table.php deleted file mode 100644 index 02e7637..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_pivot_product_cat_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_product_cat_table.php b/database/migrations/2017_06_18_104531_create_ab_product_cat_table.php deleted file mode 100644 index 9456288..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_product_cat_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_product_cat_translate_table.php b/database/migrations/2017_06_18_104531_create_ab_product_cat_translate_table.php deleted file mode 100644 index 823662b..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_product_cat_translate_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_product_table.php b/database/migrations/2017_06_18_104531_create_ab_product_table.php deleted file mode 100644 index b1fd894..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_product_table.php +++ /dev/null @@ -1,51 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_product_translate_table.php b/database/migrations/2017_06_18_104531_create_ab_product_translate_table.php deleted file mode 100644 index b136ebd..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_product_translate_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_record_id_table.php b/database/migrations/2017_06_18_104531_create_ab_record_id_table.php deleted file mode 100644 index c9cc2e3..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_record_id_table.php +++ /dev/null @@ -1,36 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_rtm_table.php b/database/migrations/2017_06_18_104531_create_ab_rtm_table.php deleted file mode 100644 index 21b8e8e..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_rtm_table.php +++ /dev/null @@ -1,38 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__adsl_table.php b/database/migrations/2017_06_18_104531_create_ab_service__adsl_table.php deleted file mode 100644 index b254ca0..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__adsl_table.php +++ /dev/null @@ -1,51 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__adsl_traffic_table.php b/database/migrations/2017_06_18_104531_create_ab_service__adsl_traffic_table.php deleted file mode 100644 index 65fb070..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__adsl_traffic_table.php +++ /dev/null @@ -1,44 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__domain_table.php b/database/migrations/2017_06_18_104531_create_ab_service__domain_table.php deleted file mode 100644 index 4f20d7d..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__domain_table.php +++ /dev/null @@ -1,50 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__hosting_table.php b/database/migrations/2017_06_18_104531_create_ab_service__hosting_table.php deleted file mode 100644 index e5864ef..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__hosting_table.php +++ /dev/null @@ -1,51 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__ssl_table.php b/database/migrations/2017_06_18_104531_create_ab_service__ssl_table.php deleted file mode 100644 index 066688a..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__ssl_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service__voip_table.php b/database/migrations/2017_06_18_104531_create_ab_service__voip_table.php deleted file mode 100644 index f711413..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service__voip_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service_change_table.php b/database/migrations/2017_06_18_104531_create_ab_service_change_table.php deleted file mode 100644 index 0a44caf..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service_change_table.php +++ /dev/null @@ -1,44 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service_memo_table.php b/database/migrations/2017_06_18_104531_create_ab_service_memo_table.php deleted file mode 100644 index 64eed1a..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service_memo_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_service_table.php b/database/migrations/2017_06_18_104531_create_ab_service_table.php deleted file mode 100644 index 028971c..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_service_table.php +++ /dev/null @@ -1,56 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_setup_invoice_table.php b/database/migrations/2017_06_18_104531_create_ab_setup_invoice_table.php deleted file mode 100644 index 33d7cbf..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_setup_invoice_table.php +++ /dev/null @@ -1,50 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_setup_table.php b/database/migrations/2017_06_18_104531_create_ab_setup_table.php deleted file mode 100644 index b5f3453..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_setup_table.php +++ /dev/null @@ -1,47 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_ssl_ca_table.php b/database/migrations/2017_06_18_104531_create_ab_ssl_ca_table.php deleted file mode 100644 index ec20ef0..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_ssl_ca_table.php +++ /dev/null @@ -1,42 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_ssl_table.php b/database/migrations/2017_06_18_104531_create_ab_ssl_table.php deleted file mode 100644 index 8b4afd8..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_ssl_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_static_page_category_table.php b/database/migrations/2017_06_18_104531_create_ab_static_page_category_table.php deleted file mode 100644 index 05fdbbc..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_static_page_category_table.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_static_page_table.php b/database/migrations/2017_06_18_104531_create_ab_static_page_table.php deleted file mode 100644 index c47438a..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_static_page_table.php +++ /dev/null @@ -1,43 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_static_page_translate_table.php b/database/migrations/2017_06_18_104531_create_ab_static_page_translate_table.php deleted file mode 100644 index 477052e..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_static_page_translate_table.php +++ /dev/null @@ -1,41 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_task_log_table.php b/database/migrations/2017_06_18_104531_create_ab_task_log_table.php deleted file mode 100644 index e889e95..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_task_log_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_task_table.php b/database/migrations/2017_06_18_104531_create_ab_task_table.php deleted file mode 100644 index 23b32e4..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_task_table.php +++ /dev/null @@ -1,50 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_tax_table.php b/database/migrations/2017_06_18_104531_create_ab_tax_table.php deleted file mode 100644 index 1ee5bd2..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_tax_table.php +++ /dev/null @@ -1,44 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_ab_voip_plan_table.php b/database/migrations/2017_06_18_104531_create_ab_voip_plan_table.php deleted file mode 100644 index af026f8..0000000 --- a/database/migrations/2017_06_18_104531_create_ab_voip_plan_table.php +++ /dev/null @@ -1,33 +0,0 @@ -bigInteger('id')->nullable(); - $table->integer('site_id')->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('ab_voip_plan'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_countries_table.php b/database/migrations/2017_06_18_104531_create_countries_table.php deleted file mode 100644 index 5524875..0000000 --- a/database/migrations/2017_06_18_104531_create_countries_table.php +++ /dev/null @@ -1,37 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_currencies_table.php b/database/migrations/2017_06_18_104531_create_currencies_table.php deleted file mode 100644 index e59c66a..0000000 --- a/database/migrations/2017_06_18_104531_create_currencies_table.php +++ /dev/null @@ -1,36 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104531_create_users_table.php b/database/migrations/2017_06_18_104531_create_users_table.php deleted file mode 100644 index 6124b05..0000000 --- a/database/migrations/2017_06_18_104531_create_users_table.php +++ /dev/null @@ -1,49 +0,0 @@ -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'); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_billing_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_billing_table.php deleted file mode 100644 index 21bcf58..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_billing_table.php +++ /dev/null @@ -1,37 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_group_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_group_table.php deleted file mode 100644 index e98ec0d..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_group_table.php +++ /dev/null @@ -1,37 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_log_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_log_table.php deleted file mode 100644 index 142148d..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_log_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_oauth_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_oauth_table.php deleted file mode 100644 index b46b0ef..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_oauth_table.php +++ /dev/null @@ -1,37 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_table.php deleted file mode 100644 index 222b8ea..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_table.php +++ /dev/null @@ -1,43 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_plan_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_plan_table.php deleted file mode 100644 index 26766e5..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_plan_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_plan_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_plan_table.php deleted file mode 100644 index ee676bf..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_plan_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_table.php deleted file mode 100644 index 64517d4..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_affiliate_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_affiliate_table.php deleted file mode 100644 index 135242c..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_affiliate_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_cart_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_cart_table.php deleted file mode 100644 index 14bf97b..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_cart_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_charge_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_charge_table.php deleted file mode 100644 index 7513d64..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_charge_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_notify_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_notify_table.php deleted file mode 100644 index d63b706..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_notify_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_table.php deleted file mode 100644 index 6c38d69..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_currency_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_currency_table.php deleted file mode 100644 index 94fb87a..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_currency_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_domain_tld_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_domain_tld_table.php deleted file mode 100644 index f103e6e..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_domain_tld_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_log_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_log_table.php deleted file mode 100644 index abbf973..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_log_table.php +++ /dev/null @@ -1,39 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_setup_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_setup_table.php deleted file mode 100644 index 62420a1..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_setup_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_table.php deleted file mode 100644 index ebd8bf8..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_table.php +++ /dev/null @@ -1,35 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_translate_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_translate_table.php deleted file mode 100644 index 02c53c9..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_translate_table.php +++ /dev/null @@ -1,37 +0,0 @@ -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'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_datamap_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_datamap_table.php deleted file mode 100644 index 7cfca74..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_datamap_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('export_module_id', 'fk_edm_exm')->references('id')->on('ab_export_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('module_id', 'fk_edm_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_export_datamap', function(Blueprint $table) - { - $table->dropForeign('fk_edm_exm'); - $table->dropForeign('fk_edm_mod'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_item_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_item_table.php deleted file mode 100644 index 30f0f27..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_item_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('export_module_id', 'fk_eit_exm')->references('id')->on('ab_export_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_export_item', function(Blueprint $table) - { - $table->dropForeign('fk_eit_exm'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_module_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_module_table.php deleted file mode 100644 index cdf80fc..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_module_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('export_id', 'fk_exm_exp')->references('id')->on('ab_export')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('module_id', 'fk_exm_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_export_module', function(Blueprint $table) - { - $table->dropForeign('fk_exm_exp'); - $table->dropForeign('fk_exm_mod'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_table.php deleted file mode 100644 index 88c4691..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_exp_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_export', function(Blueprint $table) - { - $table->dropForeign('fk_exp_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_method_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_method_table.php deleted file mode 100644 index c2a951c..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_method_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('group_id', 'fk_gm_grp')->references('id')->on('ab_group')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('method_id', 'fk_gm_mm')->references('id')->on('ab_module_method')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_group_method', function(Blueprint $table) - { - $table->dropForeign('fk_gm_grp'); - $table->dropForeign('fk_gm_mm'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_table.php deleted file mode 100644 index ec4e2fb..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_grp_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_group', function(Blueprint $table) - { - $table->dropForeign('fk_grp_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_host_server_affiliate_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_host_server_affiliate_table.php deleted file mode 100644 index ef79a4b..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_host_server_affiliate_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('affiliate_id', 'fk_hsa_aff')->references('id')->on('ab_affiliate')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('host_server_id', 'fk_hsa_hs')->references('id')->on('ab_host_server')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_host_server_affiliate', function(Blueprint $table) - { - $table->dropForeign('fk_hsa_aff'); - $table->dropForeign('fk_hsa_hs'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_table.php deleted file mode 100644 index 1859913..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_table.php +++ /dev/null @@ -1,41 +0,0 @@ -foreign('invoice_id', 'fk_ii_inv')->references('id')->on('ab_invoice')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('module_id', 'fk_ii_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('product_id', 'fk_ii_pdt')->references('id')->on('ab_product')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_ii_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_invoice_item', function(Blueprint $table) - { - $table->dropForeign('fk_ii_inv'); - $table->dropForeign('fk_ii_mod'); - $table->dropForeign('fk_ii_pdt'); - $table->dropForeign('fk_ii_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_tax_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_tax_table.php deleted file mode 100644 index a4bee11..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_tax_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('invoice_item_id', 'fk_iit_ii')->references('id')->on('ab_invoice_item')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('tax_id', 'fk_iit_tax')->references('id')->on('ab_tax')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_invoice_item_tax', function(Blueprint $table) - { - $table->dropForeign('fk_iit_ii'); - $table->dropForeign('fk_iit_tax'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_memo_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_memo_table.php deleted file mode 100644 index f4beecc..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_memo_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('account_id', 'fk_im_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('invoice_id', 'fk_im_inv')->references('id')->on('ab_invoice')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_invoice_memo', function(Blueprint $table) - { - $table->dropForeign('fk_im_acc'); - $table->dropForeign('fk_im_inv'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_table.php deleted file mode 100644 index fe253be..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('account_id', 'fk_inv_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_invoice', function(Blueprint $table) - { - $table->dropForeign('fk_inv_acc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_table.php deleted file mode 100644 index 4db15eb..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('module_id', 'fk_mm_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_module_method', function(Blueprint $table) - { - $table->dropForeign('fk_mm_mod'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_token_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_token_table.php deleted file mode 100644 index 57e87b1..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_token_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('account_id', 'fk_mmt_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('method_id', 'fk_mmt_mm')->references('id')->on('ab_module_method')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_module_method_token', function(Blueprint $table) - { - $table->dropForeign('fk_mmt_acc'); - $table->dropForeign('fk_mmt_mm'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_table.php deleted file mode 100644 index eba6c06..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('parent_id', 'fk_mod')->references('id')->on('ab_module')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_mod_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_module', function(Blueprint $table) - { - $table->dropForeign('fk_mod'); - $table->dropForeign('fk_mod_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_oauth_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_oauth_table.php deleted file mode 100644 index 85dcbfc..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_oauth_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_o_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_oauth', function(Blueprint $table) - { - $table->dropForeign('fk_o_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_item_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_item_table.php deleted file mode 100644 index b55776c..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_item_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('invoice_id', 'fk_pi_inv')->references('id')->on('ab_invoice')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('payment_id', 'fk_pi_pay')->references('id')->on('ab_payment')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_payment_item', function(Blueprint $table) - { - $table->dropForeign('fk_pi_inv'); - $table->dropForeign('fk_pi_pay'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_table.php deleted file mode 100644 index ced05b7..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_table.php +++ /dev/null @@ -1,39 +0,0 @@ -foreign('account_id', 'fk_pay_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('source_id', 'fk_pay_acc_b')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('checkout_id', 'fk_pay_co')->references('id')->on('ab_checkout')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_payment', function(Blueprint $table) - { - $table->dropForeign('fk_pay_acc'); - $table->dropForeign('fk_pay_acc_b'); - $table->dropForeign('fk_pay_co'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_pivot_product_cat_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_pivot_product_cat_table.php deleted file mode 100644 index c970395..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_pivot_product_cat_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('product_id', 'fk_p')->references('id')->on('ab_product')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('product_cat_id', 'fk_pc')->references('id')->on('ab_product_cat')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_pivot_product_cat', function(Blueprint $table) - { - $table->dropForeign('fk_p'); - $table->dropForeign('fk_pc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_table.php deleted file mode 100644 index a84c710..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('parent_id', 'fk_pc_pc')->references('id')->on('ab_product_cat')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_pc_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_product_cat', function(Blueprint $table) - { - $table->dropForeign('fk_pc_pc'); - $table->dropForeign('fk_pc_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_translate_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_translate_table.php deleted file mode 100644 index b6b6384..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_translate_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('language_id', 'fk_pct_lan')->references('id')->on('ab_language')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('product_cat_id', 'fk_pct_pc')->references('id')->on('ab_product_cat')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_product_cat_translate', function(Blueprint $table) - { - $table->dropForeign('fk_pct_lan'); - $table->dropForeign('fk_pct_pc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_table.php deleted file mode 100644 index 5a03d8c..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_pdt_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_product', function(Blueprint $table) - { - $table->dropForeign('fk_pdt_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_translate_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_translate_table.php deleted file mode 100644 index 49dc2af..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_translate_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('language_id', 'fk_pt_l')->references('id')->on('ab_language')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_pt_p')->references('site_id')->on('ab_product')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_product_translate', function(Blueprint $table) - { - $table->dropForeign('fk_pt_l'); - $table->dropForeign('fk_pt_p'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_record_id_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_record_id_table.php deleted file mode 100644 index 9af824e..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_record_id_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('module_id', 'fk_rid_mod')->references('id')->on('ab_module')->onUpdate('RESTRICT')->onDelete('RESTRICT'); - $table->foreign('site_id', 'fk_rid_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_record_id', function(Blueprint $table) - { - $table->dropForeign('fk_rid_mod'); - $table->dropForeign('fk_rid_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_rtm_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_rtm_table.php deleted file mode 100644 index c5eb439..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_rtm_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('account_id', 'fk_rtm_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('parent_id', 'fk_rtm_rtm')->references('id')->on('ab_rtm')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_rtm', function(Blueprint $table) - { - $table->dropForeign('fk_rtm_acc'); - $table->dropForeign('fk_rtm_rtm'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_table.php deleted file mode 100644 index 14b4956..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('provided_adsl_plan_id', 'fk_sa_ap')->references('id')->on('ab_adsl_plan')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_sa_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service__adsl', function(Blueprint $table) - { - $table->dropForeign('fk_sa_ap'); - $table->dropForeign('fk_sa_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_traffic_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_traffic_table.php deleted file mode 100644 index 0c5eedd..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_traffic_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('supplier_id', 'fk_sat_as')->references('id')->on('ab_adsl_supplier')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service__adsl_traffic', function(Blueprint $table) - { - $table->dropForeign('fk_sat_as'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__domain_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__domain_table.php deleted file mode 100644 index 71f8ef4..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__domain_table.php +++ /dev/null @@ -1,39 +0,0 @@ -foreign('domain_registrar_id', 'fk_sd_hrp')->references('id')->on('ab_domain_registrar')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('domain_tld_id', 'fk_sd_ht')->references('id')->on('ab_domain_tld')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_sd_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service__domain', function(Blueprint $table) - { - $table->dropForeign('fk_sd_hrp'); - $table->dropForeign('fk_sd_ht'); - $table->dropForeign('fk_sd_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__hosting_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__hosting_table.php deleted file mode 100644 index d412022..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__hosting_table.php +++ /dev/null @@ -1,39 +0,0 @@ -foreign('host_server_id', 'fk_sh_hs')->references('id')->on('ab_host_server')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('domain_tld_id', 'fk_sh_ht')->references('id')->on('ab_domain_tld')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_sh_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service__hosting', function(Blueprint $table) - { - $table->dropForeign('fk_sh_hs'); - $table->dropForeign('fk_sh_ht'); - $table->dropForeign('fk_sh_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__ssl_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__ssl_table.php deleted file mode 100644 index a13a376..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__ssl_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('ssl_ca_id', 'fk_ss_sca')->references('id')->on('ab_ssl_ca')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_ss_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service__ssl', function(Blueprint $table) - { - $table->dropForeign('fk_ss_sca'); - $table->dropForeign('fk_ss_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_change_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_change_table.php deleted file mode 100644 index 0690fc4..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_change_table.php +++ /dev/null @@ -1,39 +0,0 @@ -foreign('site_id', 'fk_sc_a')->references('site_id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_sc_p')->references('site_id')->on('ab_product')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_sc_s')->references('site_id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service_change', function(Blueprint $table) - { - $table->dropForeign('fk_sc_a'); - $table->dropForeign('fk_sc_p'); - $table->dropForeign('fk_sc_s'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_memo_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_memo_table.php deleted file mode 100644 index bd4dd97..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_memo_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('account_id', 'fk_sm_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('service_id', 'fk_sm_svc')->references('id')->on('ab_service')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service_memo', function(Blueprint $table) - { - $table->dropForeign('fk_sm_acc'); - $table->dropForeign('fk_sm_svc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_table.php deleted file mode 100644 index 07e3c2d..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('account_id', 'fk_svc_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('site_id', 'fk_svc_grp')->references('site_id')->on('ab_group')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service', function(Blueprint $table) - { - $table->dropForeign('fk_svc_acc'); - $table->dropForeign('fk_svc_grp'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_setup_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_setup_table.php deleted file mode 100644 index 097de84..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_setup_table.php +++ /dev/null @@ -1,41 +0,0 @@ -foreign('admin_id', 'fk_set_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('country_id', 'fk_set_cty')->references('id')->on('ab_country')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('currency_id', 'fk_set_cur')->references('id')->on('ab_currency')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('language_id', 'fk_set_lan')->references('id')->on('ab_language')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_setup', function(Blueprint $table) - { - $table->dropForeign('fk_set_acc'); - $table->dropForeign('fk_set_cty'); - $table->dropForeign('fk_set_cur'); - $table->dropForeign('fk_set_lan'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_ca_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_ca_table.php deleted file mode 100644 index 4c1ff46..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_ca_table.php +++ /dev/null @@ -1,37 +0,0 @@ -foreign('parent_ssl_ca_id', 'fk_sca')->references('id')->on('ab_ssl_ca')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - $table->foreign('account_id', 'fk_sca_acc')->references('id')->on('ab_account')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_ssl_ca', function(Blueprint $table) - { - $table->dropForeign('fk_sca'); - $table->dropForeign('fk_sca_acc'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_table.php deleted file mode 100644 index c555126..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_ssl_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_ssl', function(Blueprint $table) - { - $table->dropForeign('fk_ssl_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_log_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_log_table.php deleted file mode 100644 index bfdd2b8..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_log_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('task_id', 'fk_tl_t')->references('id')->on('ab_task')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_task_log', function(Blueprint $table) - { - $table->dropForeign('fk_tl_t'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_table.php deleted file mode 100644 index 45972b7..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('site_id', 'fk_tsk_set')->references('id')->on('ab_setup')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_task', function(Blueprint $table) - { - $table->dropForeign('fk_tsk_set'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_tax_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_tax_table.php deleted file mode 100644 index 8baebc2..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_tax_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('country_id', 'fk_tax_cty')->references('id')->on('ab_country')->onUpdate('NO ACTION')->onDelete('NO ACTION'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_tax', function(Blueprint $table) - { - $table->dropForeign('fk_tax_cty'); - }); - } - -} diff --git a/database/migrations/2017_06_18_104533_add_foreign_keys_to_countries_table.php b/database/migrations/2017_06_18_104533_add_foreign_keys_to_countries_table.php deleted file mode 100644 index d67f1c1..0000000 --- a/database/migrations/2017_06_18_104533_add_foreign_keys_to_countries_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreign('currency_id')->references('id')->on('currencies')->onUpdate('RESTRICT')->onDelete('RESTRICT'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('countries', function(Blueprint $table) - { - $table->dropForeign('countries_currency_id_foreign'); - }); - } - -} diff --git a/database/migrations/2018_03_11_141103_create_quick_books_tokens_table.php b/database/migrations/2018_03_11_141103_create_quick_books_tokens_table.php deleted file mode 100644 index 8171f7f..0000000 --- a/database/migrations/2018_03_11_141103_create_quick_books_tokens_table.php +++ /dev/null @@ -1,43 +0,0 @@ -increments('id'); - $table->unsignedInteger('user_id'); - $table->unsignedBigInteger('realm_id'); - $table->longtext('access_token'); - $table->datetime('access_token_expires_at'); - $table->string('refresh_token'); - $table->datetime('refresh_token_expires_at'); - - $table->timestamps(); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('quickbooks_token'); - } -} diff --git a/database/migrations/2018_05_14_122513_currency_add_rounding.php b/database/migrations/2018_05_14_122513_currency_add_rounding.php deleted file mode 100644 index fb39b7e..0000000 --- a/database/migrations/2018_05_14_122513_currency_add_rounding.php +++ /dev/null @@ -1,36 +0,0 @@ -smallInteger('rounding'); - }); - - Currency::query()->update(['rounding'=>2]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_currency', function (Blueprint $table) { - $table->dropColumn('rounding'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2018_05_20_052944_account_add_remember_token.php b/database/migrations/2018_05_20_052944_account_add_remember_token.php deleted file mode 100644 index b617e93..0000000 --- a/database/migrations/2018_05_20_052944_account_add_remember_token.php +++ /dev/null @@ -1,32 +0,0 @@ -rememberToken(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_account', function (Blueprint $table) { - $table->dropRememberToken(); - }); - } -} diff --git a/database/migrations/2018_06_18_114830_currency_change_threecode.php b/database/migrations/2018_06_18_114830_currency_change_threecode.php deleted file mode 100644 index 4c1b83e..0000000 --- a/database/migrations/2018_06_18_114830_currency_change_threecode.php +++ /dev/null @@ -1,32 +0,0 @@ -renameColumn('three_digit','iso_code'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_currency', function (Blueprint $table) { - $table->renameColumn('iso_code','three_digit'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2018_06_22_062015_account_add_user.php b/database/migrations/2018_06_22_062015_account_add_user.php deleted file mode 100644 index 2c9823f..0000000 --- a/database/migrations/2018_06_22_062015_account_add_user.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('user_id')->nullable()->unsigned(); - $table->foreign('user_id')->references('id')->on('users'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_account', function (Blueprint $table) { - $table->dropForeign(['user_id']); - $table->dropColumn('user_id'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2018_06_22_062022_user_add_heirachy.php b/database/migrations/2018_06_22_062022_user_add_heirachy.php deleted file mode 100644 index 1d349f5..0000000 --- a/database/migrations/2018_06_22_062022_user_add_heirachy.php +++ /dev/null @@ -1,34 +0,0 @@ -integer('parent_id')->nullable()->unsigned(); - $table->foreign('parent_id')->references('id')->on('users'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropForeign(['parent_id']); - $table->dropColumn('parent_id'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2018_07_10_034223_users_add_language.php b/database/migrations/2018_07_10_034223_users_add_language.php deleted file mode 100644 index 2ba76df..0000000 --- a/database/migrations/2018_07_10_034223_users_add_language.php +++ /dev/null @@ -1,38 +0,0 @@ -integer('language_id')->nullable(); - $table->foreign('language_id')->references('id')->on('ab_language'); - $table->integer('currency_id')->nullable(); - $table->foreign('currency_id')->references('id')->on('ab_currency'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropForeign(['language_id']); - $table->dropColumn('language_id'); - $table->dropForeign(['currency_id']); - $table->dropColumn('currency_id'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2018_07_28_234942_create_site_details.php b/database/migrations/2018_07_28_234942_create_site_details.php deleted file mode 100644 index c9a145f..0000000 --- a/database/migrations/2018_07_28_234942_create_site_details.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('site_id'); - $table->string('key'); - $table->json('value'); - - $table->foreign('site_id')->references('id')->on('ab_setup'); - $table->unique(['site_id','key']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('site_details'); - } -} diff --git a/database/migrations/2018_08_10_115648_service_add_status.php b/database/migrations/2018_08_10_115648_service_add_status.php deleted file mode 100644 index 9ba37e9..0000000 --- a/database/migrations/2018_08_10_115648_service_add_status.php +++ /dev/null @@ -1,38 +0,0 @@ -integer('orderby_id')->unsigned()->nullable(); - $table->string('order_status')->nullable(); - $table->json('order_info')->nullable(); - $table->foreign('orderby_id')->references('id')->on('users'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service', function (Blueprint $table) { - $table->dropForeign(['orderby_id']); - $table->dropColumn('orderby_id'); - $table->dropColumn('order_status'); - $table->dropColumn('order_info'); - }); - } -} \ No newline at end of file diff --git a/database/migrations/2019_01_24_142111_create_jobs_table.php b/database/migrations/2019_01_24_142111_create_jobs_table.php deleted file mode 100644 index 58d7715..0000000 --- a/database/migrations/2019_01_24_142111_create_jobs_table.php +++ /dev/null @@ -1,36 +0,0 @@ -bigIncrements('id'); - $table->string('queue')->index(); - $table->longText('payload'); - $table->unsignedTinyInteger('attempts'); - $table->unsignedInteger('reserved_at')->nullable(); - $table->unsignedInteger('available_at'); - $table->unsignedInteger('created_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('jobs'); - } -} diff --git a/database/migrations/2019_01_24_175606_create_failed_jobs_table.php b/database/migrations/2019_01_24_175606_create_failed_jobs_table.php deleted file mode 100644 index d432dff..0000000 --- a/database/migrations/2019_01_24_175606_create_failed_jobs_table.php +++ /dev/null @@ -1,35 +0,0 @@ -bigIncrements('id'); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('failed_jobs'); - } -} diff --git a/database/migrations/2019_06_02_163527_add_model_to_service.php b/database/migrations/2019_06_02_163527_add_model_to_service.php deleted file mode 100644 index 2c3e404..0000000 --- a/database/migrations/2019_06_02_163527_add_model_to_service.php +++ /dev/null @@ -1,51 +0,0 @@ -string('model')->nullable(); - }); - - // Go through our services and add the relation - foreach (\App\Models\Service\Adsl::all() as $o) - $this->update($o); - foreach (\App\Models\Service\Domain::all() as $o) - $this->update($o); - foreach (\App\Models\Service\Host::all() as $o) - $this->update($o); - foreach (\App\Models\Service\SSL::all() as $o) - $this->update($o); - foreach (\App\Models\Service\Voip::all() as $o) - $this->update($o); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_service', function (Blueprint $table) { - $table->dropColumn('model'); - }); - } - - function update(\Illuminate\Database\Eloquent\Model $o) - { - $oo = \App\Models\Service::findOrFail($o->service_id); - $oo->model = get_class($o); - $oo->save(); - } -} diff --git a/database/migrations/2019_06_11_160940_add_external.php b/database/migrations/2019_06_11_160940_add_external.php deleted file mode 100644 index 644941f..0000000 --- a/database/migrations/2019_06_11_160940_add_external.php +++ /dev/null @@ -1,37 +0,0 @@ -increments('id'); - $table->string('name'); - $table->longText('description'); - $table->string('type'); - $table->boolean('active'); - - $table->integer('user_id')->unsigned(); - $table->foreign('user_id')->references('id')->on('users'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('external_integrations'); - } -} diff --git a/database/migrations/2019_06_11_161150_add_external_account.php b/database/migrations/2019_06_11_161150_add_external_account.php deleted file mode 100644 index 2c323e9..0000000 --- a/database/migrations/2019_06_11_161150_add_external_account.php +++ /dev/null @@ -1,39 +0,0 @@ -bigInteger('account_id'); - $table->integer('site_id')->nullable(); - $table->integer('external_integration_id')->unsigned(); - $table->string('link'); - - $table->foreign('site_id')->references('id')->on('ab_setup'); - $table->foreign('external_integration_id')->references('id')->on('external_integrations'); - $table->foreign('account_id')->references('id')->on('ab_account'); - - $table->unique(['site_id','account_id','external_integration_id'],'sae'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('external_account'); - } -} diff --git a/database/migrations/2019_06_29_101655_add_model_to_product.php b/database/migrations/2019_06_29_101655_add_model_to_product.php deleted file mode 100644 index 79c60b7..0000000 --- a/database/migrations/2019_06_29_101655_add_model_to_product.php +++ /dev/null @@ -1,57 +0,0 @@ -string('model')->nullable(); - }); - - // Go through our services and add the relation - foreach (\App\Models\Product\Adsl::all() as $o) - $this->update($o,'ADSL'); - /* - foreach (\App\Models\Product\Domain::all() as $o) - $this->update($o); - foreach (\App\Models\Product\Host::all() as $o) - $this->update($o); - */ - foreach (\App\Models\Product\SSL::all() as $o) - $this->update($o,'SSL'); - /* - foreach (\App\Models\Product\Voip::all() as $o) - $this->update($o); - */ - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_product', function (Blueprint $table) { - $table->dropColumn('model'); - }); - } - - function update(\Illuminate\Database\Eloquent\Model $o,$file) - { - foreach (\App\Models\Product::where('prod_plugin_file',$file)->where('prod_plugin_data',$o->id)->get() as $oo) - { - $oo->model = get_class($o); - $oo->save(); - } - } -} diff --git a/database/migrations/2019_07_05_092048_add_user_to_accountoauth.php b/database/migrations/2019_07_05_092048_add_user_to_accountoauth.php deleted file mode 100644 index 84182ba..0000000 --- a/database/migrations/2019_07_05_092048_add_user_to_accountoauth.php +++ /dev/null @@ -1,70 +0,0 @@ -index(['id','site_id'],'site_user_id_idx'); - }); - - Schema::table('ab_account_oauth', function (Blueprint $table) { - $table->dropPrimary(['id','site_id','account_id','oauth_id']); - $table->primary(['id','site_id','oauth_id']); - }); - - Schema::table('ab_account_oauth', function (Blueprint $table) { - $table->bigInteger('account_id')->nullable()->change(); - - $table->integer('user_id')->unsigned()->nullable(); - $table->unique(['site_id','user_id','oauth_id']); - $table->index(['user_id','site_id'],'site_user_id_idx'); - $table->foreign(['user_id','site_id'],'site_user_id')->references(['id','site_id'])->on('users'); - }); - - Schema::table('ab_oauth', function (Blueprint $table) { - $table->string('name',32)->change(); - $table->unique(['site_id','name']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_account_oauth', function (Blueprint $table) { - $table->dropPrimary(['id','site_id','oauth_id']); - $table->primary(['id','site_id','account_id','oauth_id']); - }); - - Schema::table('ab_account_oauth', function (Blueprint $table) { - $table->dropForeign('site_user_id'); - $table->dropUnique(['site_id','user_id','oauth_id']); - $table->dropIndex('site_user_id_idx'); - $table->dropColumn('user_id'); - - $table->bigInteger('account_id')->change(); - }); - - Schema::table('users',function(Blueprint $table) { - $table->dropIndex('site_user_id_idx'); - }); - - Schema::table('ab_oauth', function (Blueprint $table) { - $table->string('name',32)->nullable()->change(); - $table->dropUnique(['site_id','name']); - }); - } -} diff --git a/database/migrations/2020_04_22_231133_change_service_number_adsl.php b/database/migrations/2020_04_22_231133_change_service_number_adsl.php deleted file mode 100644 index 63a774a..0000000 --- a/database/migrations/2020_04_22_231133_change_service_number_adsl.php +++ /dev/null @@ -1,28 +0,0 @@ -bigInteger('ab_service_adsl_id')->nullable(); - $table->foreign('ab_service_adsl_id')->references('id')->on('ab_service__adsl'); - - $table->unique(['ab_service_adsl_id','date','time']); - }); - - DB::statement('ALTER TABLE ab_service__adsl_traffic CHANGE COLUMN service service varchar(128) DEFAULT NULL'); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - DB::statement('ALTER TABLE ab_service__adsl_traffic CHANGE COLUMN service service varchar(128) NOT NULL'); - - Schema::table('ab_service__adsl_traffic', function (Blueprint $table) { - $table->dropForeign(['ab_service_adsl_id']); - $table->dropUnique(['ab_service_adsl_id','date','time']); - $table->dropColumn('ab_service_adsl_id'); - }); - } -} diff --git a/database/migrations/2020_07_24_153836_addpending_to_payment.php b/database/migrations/2020_07_24_153836_addpending_to_payment.php deleted file mode 100644 index fd132ab..0000000 --- a/database/migrations/2020_07_24_153836_addpending_to_payment.php +++ /dev/null @@ -1,32 +0,0 @@ -string('pending')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('ab_payment', function (Blueprint $table) { - $table->dropColumn('pending'); - }); - } -} diff --git a/database/migrations/2020_12_01_225123_add_service_generic.php b/database/migrations/2020_12_01_225123_add_service_generic.php deleted file mode 100644 index 1b8ba06..0000000 --- a/database/migrations/2020_12_01_225123_add_service_generic.php +++ /dev/null @@ -1,58 +0,0 @@ -bigInteger('id',TRUE); - $table->integer('site_id'); - $table->bigInteger('service_id'); - $table->bigInteger('product_id'); - - $table->foreign('site_id')->references('id')->on('ab_setup'); - $table->foreign(['service_id','site_id'])->references(['id','site_id'])->on('ab_service'); - $table->foreign(['product_id','site_id'])->references(['id','site_id'])->on('ab_product'); - - $table->unique(['site_id','service_id']); - }); - - foreach (\App\Models\Service::whereNULL('model')->get() as $o) { - $oo = new \App\Models\Service\Generic; - $oo->service_id = $o->id; - $oo->site_id = $o->site_id; - $oo->product_id = 0; - $oo->save(); - - $o->model = 'App\Models\Service\Generic'; - $o->save(); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - foreach (\App\Models\Service::where('model','App\Models\Service\Generic')->get() as $o) { - if ($o->type) - $o->type->delete(); - - $o->model = NULL; - $o->save(); - } - - Schema::dropIfExists('service__generic'); - } -} diff --git a/database/migrations/2021_06_30_171340_rename_setup.php b/database/migrations/2021_06_30_171340_rename_setup.php deleted file mode 100644 index 3298803..0000000 --- a/database/migrations/2021_06_30_171340_rename_setup.php +++ /dev/null @@ -1,61 +0,0 @@ -dropForeign('fk_set_acc'); - $table->dropForeign('fk_set_cty'); - $table->dropForeign('fk_set_cur'); - $table->dropForeign('fk_set_lan'); - }); - - Schema::table('ab_setup', function (Blueprint $table) { - $table->dropIndex('fk_set_cty_idx'); - $table->dropIndex('fk_set_cur_idx'); - $table->dropIndex('fk_set_lan_idx'); - $table->dropIndex('fk_set_acc_idx'); - }); - DB::statement('ALTER TABLE ab_setup RENAME TO sites'); - DB::statement('ALTER TABLE sites MODIFY url VARCHAR(256) NOT NULL'); - DB::statement('ALTER TABLE sites CHANGE COLUMN id site_id INT NOT NULL'); - DB::statement('ALTER TABLE sites MODIFY admin_id INT(10) UNSIGNED DEFAULT NULL'); - DB::statement('ALTER TABLE sites MODIFY active TINYINT(1) NOT NULL'); - - Schema::table('sites', function (Blueprint $table) { - $table->index(['site_id']); - $table->dropPrimary(['site_id','country_id','currency_id','url']); - }); - - Schema::table('sites', function (Blueprint $table) { - $table->integer('id',TRUE)->first(); - $table->unique(['site_id','url']); - $table->dropColumn(['login_expire','time_format','date_format','decimal_place','module_config','site_details']); - - $table->foreign('country_id')->references('id')->on('ab_country'); - $table->foreign('currency_id')->references('id')->on('ab_currency'); - $table->foreign('language_id')->references('id')->on('ab_language'); - $table->foreign(['admin_id','site_id'])->references(['id','site_id'])->on('users'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - abort(500,'cant go back'); - } -} diff --git a/database/migrations/2021_07_07_164413_rework_account.php b/database/migrations/2021_07_07_164413_rework_account.php deleted file mode 100644 index 3c06ce4..0000000 --- a/database/migrations/2021_07_07_164413_rework_account.php +++ /dev/null @@ -1,33 +0,0 @@ -dropUnique('uq_username'); - $table->dropColumn(['username','password','first_name','last_name','title','email','email_type','invoice_delivery','mail_type','remember_token']); - }); - - DB::statement('ALTER TABLE ab_account RENAME TO accounts'); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - abort(500,'cant go back'); - } -} diff --git a/database/schema/mysql-schema.dump b/database/schema/mysql-schema.dump new file mode 100644 index 0000000..ee4efbd --- /dev/null +++ b/database/schema/mysql-schema.dump @@ -0,0 +1,1998 @@ +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `ab_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `language_id` int(11) NOT NULL, + `country_id` int(11) NOT NULL, + `rtm_id` bigint(20) DEFAULT NULL, + `currency_id` int(11) NOT NULL, + `username` varchar(128) DEFAULT NULL, + `password` varchar(128) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `first_name` varchar(128) DEFAULT NULL, + `last_name` varchar(128) DEFAULT NULL, + `title` varchar(128) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `company` varchar(255) DEFAULT NULL, + `address1` varchar(128) DEFAULT NULL, + `address2` varchar(128) DEFAULT NULL, + `city` varchar(32) DEFAULT NULL, + `state` varchar(32) DEFAULT NULL, + `zip` varchar(16) DEFAULT NULL, + `email_type` tinyint(4) DEFAULT NULL, + `invoice_delivery` int(11) DEFAULT NULL, + `mail_type` set('EMAIL','POST') DEFAULT NULL, + `remember_token` varchar(100) DEFAULT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `uq_username` (`site_id`,`username`), + KEY `fk_acc_set_idx` (`site_id`), + KEY `fk_acc_lan_idx` (`language_id`), + KEY `fk_acc_rtm_idx` (`rtm_id`,`site_id`), + KEY `fk_acc_cty_idx` (`country_id`), + KEY `fk_acc_cur_idx` (`currency_id`), + KEY `ab_account_user_id_foreign` (`user_id`), + CONSTRAINT `ab_account_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), + CONSTRAINT `fk_acc_cty` FOREIGN KEY (`country_id`) REFERENCES `ab_country` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_acc_cur` FOREIGN KEY (`currency_id`) REFERENCES `ab_currency` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_acc_lan` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_acc_rtm` FOREIGN KEY (`rtm_id`, `site_id`) REFERENCES `ab_rtm` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_acc_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_account_billing`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account_billing` ( + `id` int(11) NOT NULL, + `site_id` int(11) NOT NULL, + `account_id` bigint(20) DEFAULT NULL, + `checkout_id` int(11) NOT NULL, + `service_id` bigint(20) DEFAULT NULL, + `checkout_data` blob DEFAULT NULL, + `checkout_amount` double DEFAULT NULL, + `notes` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`checkout_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`service_id`), + KEY `fk_ab_a` (`account_id`,`site_id`), + KEY `fk_ab_s` (`service_id`,`site_id`), + CONSTRAINT `fk_ab_a` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ab_s` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_account_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account_group` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `group_id` int(11) NOT NULL DEFAULT 0, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `service_id` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`,`group_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`group_id`,`account_id`), + KEY `fk_ag_acc_idx` (`account_id`,`site_id`), + KEY `fk_ag_grp_idx` (`group_id`,`site_id`), + CONSTRAINT `fk_ag_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ag_grp` FOREIGN KEY (`group_id`, `site_id`) REFERENCES `ab_group` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_account_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account_log` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `ip` varchar(32) DEFAULT NULL, + `details` varchar(256) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_al_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_al_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_account_memo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account_memo` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `staff_id` bigint(20) DEFAULT NULL, + `account_id` bigint(20) DEFAULT NULL, + `type` varchar(32) DEFAULT NULL, + `memo` varchar(255) DEFAULT NULL, + `misc` varchar(32) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `account` (`account_id`), + KEY `memo` (`memo`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_account_oauth`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_account_oauth` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `account_id` bigint(20) DEFAULT NULL, + `oauth_id` int(11) NOT NULL, + `userid` varchar(128) NOT NULL, + `oauth_data` blob DEFAULT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`oauth_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`account_id`,`oauth_id`), + UNIQUE KEY `ab_account_oauth_site_id_user_id_oauth_id_unique` (`site_id`,`user_id`,`oauth_id`), + KEY `fk_ao_o_idx` (`oauth_id`,`site_id`), + KEY `fk_ao_a_idx` (`account_id`,`site_id`), + KEY `site_user_id_idx` (`user_id`,`site_id`), + CONSTRAINT `fk_ao_a` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ao_o` FOREIGN KEY (`oauth_id`, `site_id`) REFERENCES `ab_oauth` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `site_user_id` FOREIGN KEY (`user_id`, `site_id`) REFERENCES `users` (`id`, `site_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_adsl_plan`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_adsl_plan` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `adsl_supplier_plan_id` bigint(20) NOT NULL DEFAULT 0, + `contract_term` int(11) DEFAULT NULL, + `base_down_peak` double DEFAULT NULL, + `base_up_peak` double DEFAULT NULL, + `base_down_offpeak` double DEFAULT NULL, + `base_up_offpeak` double DEFAULT NULL, + `extra_charged` tinyint(4) DEFAULT NULL, + `extra_shaped` varchar(8) DEFAULT NULL, + `extra_down_peak` double DEFAULT NULL, + `extra_up_peak` double DEFAULT NULL, + `extra_down_offpeak` double DEFAULT NULL, + `extra_up_offpeak` double DEFAULT NULL, + `metric` double NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`site_id`,`adsl_supplier_plan_id`), + KEY `fk_ap_asp_idx` (`adsl_supplier_plan_id`,`site_id`), + CONSTRAINT `fk_ap_asp` FOREIGN KEY (`adsl_supplier_plan_id`, `site_id`) REFERENCES `ab_adsl_supplier_plan` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_adsl_supplier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_adsl_supplier` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `active` tinyint(4) DEFAULT NULL, + `debug` tinyint(4) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `notes` varchar(255) DEFAULT NULL, + `provision_plugin` varchar(128) DEFAULT NULL, + `provision_plugin_data` longtext DEFAULT NULL, + `max_accounts` int(11) DEFAULT NULL, + `stats_url` varchar(256) DEFAULT NULL, + `stats_lastupdate` date DEFAULT NULL, + `stats_username` varchar(16) DEFAULT NULL, + `stats_password` varchar(16) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_as_set_idx` (`site_id`), + CONSTRAINT `fk_as_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_adsl_supplier_plan`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_adsl_supplier_plan` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `supplier_id` int(11) NOT NULL DEFAULT 0, + `product_id` varchar(16) DEFAULT NULL, + `product_desc` varchar(128) DEFAULT NULL, + `base_cost` double DEFAULT NULL, + `setup_cost` double DEFAULT NULL, + `contract_term` int(11) DEFAULT NULL, + `base_down_peak` double DEFAULT NULL, + `base_up_peak` double DEFAULT NULL, + `base_down_offpeak` double DEFAULT NULL, + `base_up_offpeak` double DEFAULT NULL, + `extra_charged` tinyint(4) DEFAULT NULL, + `extra_shaped` varchar(8) DEFAULT NULL, + `offpeak_start` bigint(20) DEFAULT NULL, + `offpeak_end` bigint(20) DEFAULT NULL, + `extra_down_peak` double DEFAULT NULL, + `extra_up_peak` double DEFAULT NULL, + `extra_down_offpeak` double DEFAULT NULL, + `extra_up_offpeak` double DEFAULT NULL, + `metric` double NOT NULL DEFAULT 0, + `speed` varchar(64) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`supplier_id`), + KEY `fk_asp_as_idx` (`supplier_id`,`site_id`), + CONSTRAINT `fk_asp_as` FOREIGN KEY (`supplier_id`, `site_id`) REFERENCES `ab_adsl_supplier` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_affiliate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_affiliate` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `avail_campaign_id` longtext DEFAULT NULL, + `affiliate_plugin` varchar(32) DEFAULT NULL, + `parent_affiliate_id` varchar(16) DEFAULT NULL, + `max_tiers` int(11) DEFAULT NULL, + `commission_minimum` double DEFAULT NULL, + `new_commission_type` tinyint(4) DEFAULT NULL, + `new_commission_rate` longtext DEFAULT NULL, + `recurr_commission_type` tinyint(4) DEFAULT NULL, + `recurr_commission_rate` longtext DEFAULT NULL, + `recurr_max_commission_periods` int(11) DEFAULT NULL, + `plugin_data` longtext DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_aff_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_aff_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_asset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_asset` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `service_id` bigint(20) DEFAULT NULL, + `pool_id` int(11) DEFAULT NULL, + `asset` varchar(128) DEFAULT NULL, + `misc` varchar(255) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `assets` (`id`,`site_id`), + KEY `asso` (`pool_id`), + KEY `service` (`service_id`), + KEY `asset` (`asset`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_asset_pool`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_asset_pool` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `main` (`id`,`site_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_cart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_cart` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `session_id` varchar(32) NOT NULL DEFAULT '', + `quantity` int(11) DEFAULT NULL, + `module_id` int(11) NOT NULL DEFAULT 0, + `module_item` int(11) NOT NULL DEFAULT 0, + `module_data` text DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_mod_crt_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_mod_crt` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_charge`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_charge` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `processed` tinyint(4) DEFAULT NULL, + `sweep_type` int(11) DEFAULT NULL, + `type` int(11) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `product_id` bigint(20) DEFAULT NULL, + `service_id` bigint(20) DEFAULT NULL, + `date_charge` bigint(20) DEFAULT NULL, + `amount` double DEFAULT NULL, + `quantity` double DEFAULT NULL, + `taxable` tinyint(4) DEFAULT NULL, + `attributes` blob DEFAULT NULL, + `description` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_chg_acc_idx` (`account_id`,`site_id`), + KEY `fk_chg_svc_idx` (`service_id`,`site_id`), + KEY `fk_chg_pdt_idx` (`product_id`,`site_id`), + CONSTRAINT `fk_chg_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_chg_pdt` FOREIGN KEY (`product_id`, `site_id`) REFERENCES `ab_product` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_chg_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_checkout`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_checkout` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `active` tinyint(4) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `plugin` varchar(32) DEFAULT NULL, + `plugin_data` longtext DEFAULT NULL, + `graphic_url` varchar(128) DEFAULT NULL, + `amount_min` double DEFAULT 0, + `amount_max` double DEFAULT NULL, + `fee_fixed` double DEFAULT NULL, + `fee_variable` double DEFAULT NULL, + `fee_passon` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_cko_set_idx` (`site_id`), + CONSTRAINT `fk_cko_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_checkout_notify`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_checkout_notify` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `checkout_id` int(11) NOT NULL, + `active` tinyint(4) DEFAULT NULL, + `data` blob NOT NULL, + `processed` tinyint(4) DEFAULT NULL, + `result` text DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`checkout_id`), + KEY `fk_cn_c_idx` (`checkout_id`,`site_id`), + CONSTRAINT `fk_cn_c` FOREIGN KEY (`checkout_id`, `site_id`) REFERENCES `ab_checkout` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_country`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_country` ( + `id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) DEFAULT NULL, + `description` varchar(128) DEFAULT NULL, + `notes` varchar(128) DEFAULT NULL, + `two_code` varchar(16) DEFAULT NULL, + `three_code` varchar(16) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `currency_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `two_code_UNIQUE` (`two_code`), + UNIQUE KEY `three_code_UNIQUE` (`three_code`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_currency`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_currency` ( + `id` int(11) NOT NULL DEFAULT 0, + `country_id` int(11) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `convert_array` longtext DEFAULT NULL, + `notes` varchar(128) DEFAULT NULL, + `symbol` varchar(16) DEFAULT NULL, + `iso_code` varchar(3) DEFAULT NULL, + `rounding` smallint(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `three_digit_UNIQUE` (`iso_code`), + KEY `fk_cur_cty_idx` (`country_id`), + CONSTRAINT `fk_cur_cty` FOREIGN KEY (`country_id`) REFERENCES `ab_country` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_discount`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_discount` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `name` varchar(64) DEFAULT NULL, + `notes` longtext DEFAULT NULL, + `max_usage_account` int(11) DEFAULT NULL, + `max_usage_global` int(11) DEFAULT NULL, + `avail_account_id` bigint(20) DEFAULT NULL, + `avail_product_id` longtext DEFAULT NULL, + `avail_group_id` longtext DEFAULT NULL, + `avail_tld_id` longtext DEFAULT NULL, + `new_status` tinyint(4) DEFAULT NULL, + `new_type` tinyint(4) DEFAULT NULL, + `new_rate` double DEFAULT NULL, + `new_max_discount` double DEFAULT NULL, + `new_min_cost` double DEFAULT NULL, + `recurr_status` tinyint(4) DEFAULT NULL, + `recurr_type` tinyint(4) DEFAULT NULL, + `recurr_rate` double DEFAULT NULL, + `recurr_max_discount` double DEFAULT NULL, + `recurr_min_cost` double DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `start` (`date_start`), + KEY `expire` (`date_expire`), + KEY `status` (`active`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_domain_registrar`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_domain_registrar` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `active` tinyint(4) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL, + `file` varchar(32) DEFAULT NULL, + `whitelabel_url` varchar(256) DEFAULT NULL, + `whitelabel_ns` varchar(1024) DEFAULT NULL, + `manage_url` varchar(256) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `fk_hrp_set` (`site_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_domain_tld`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_domain_tld` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `taxable` tinyint(4) DEFAULT NULL, + `whois_plugin` varchar(32) DEFAULT NULL, + `whois_plugin_data` longtext DEFAULT NULL, + `registrar_plugin_id` int(11) NOT NULL DEFAULT 0, + `registrar_plugin_data` longtext DEFAULT NULL, + `auto_search` tinyint(4) DEFAULT NULL, + `default_term_new` int(11) DEFAULT NULL, + `price_group` longtext DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`registrar_plugin_id`), + KEY `fk_ht_hrp_idx` (`registrar_plugin_id`,`site_id`), + CONSTRAINT `fk_ht_hrp` FOREIGN KEY (`registrar_plugin_id`, `site_id`) REFERENCES `ab_domain_registrar` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_email_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_email_log` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `email_template_translate_id` bigint(20) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, + `subject` varchar(128) DEFAULT NULL, + `message` longtext DEFAULT NULL, + `html` tinyint(4) DEFAULT NULL, + `urgent` tinyint(4) DEFAULT NULL, + `userread` tinyint(4) DEFAULT NULL, + `data` blob DEFAULT NULL, + `module_id` int(11) DEFAULT NULL, + `module_data` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_el_ett_idx` (`email_template_translate_id`,`site_id`), + KEY `fk_el_acc_idx` (`account_id`,`site_id`), + KEY `fk_el_mod_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_el_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_el_ett` FOREIGN KEY (`email_template_translate_id`, `site_id`) REFERENCES `ab_email_template_translate` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_el_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_email_setup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_email_setup` ( + `id` int(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `name` varchar(128) DEFAULT NULL, + `notes` longtext DEFAULT NULL, + `type` tinyint(4) DEFAULT NULL, + `from_name` varchar(128) DEFAULT NULL, + `from_email` varchar(128) DEFAULT NULL, + `cc_list` longtext DEFAULT NULL, + `bcc_list` longtext DEFAULT NULL, + `server` varchar(128) DEFAULT NULL, + `username` varchar(128) DEFAULT NULL, + `password` varchar(128) DEFAULT NULL, + `piping` varchar(4) DEFAULT NULL, + `piping_host` varchar(128) DEFAULT NULL, + `piping_username` varchar(128) DEFAULT NULL, + `piping_password` varchar(128) DEFAULT NULL, + `piping_action` varchar(4) DEFAULT NULL, + `queue` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_es_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_es_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_email_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_email_template` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `active` tinyint(4) DEFAULT NULL, + `email_setup_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) DEFAULT NULL, + `description` varchar(32) DEFAULT NULL, + `notes` longtext DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`email_setup_id`), + KEY `fk_et_es_idx` (`email_setup_id`,`site_id`), + CONSTRAINT `fk_et_es` FOREIGN KEY (`email_setup_id`, `site_id`) REFERENCES `ab_email_setup` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_email_template_translate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_email_template_translate` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `email_template_id` bigint(20) NOT NULL DEFAULT 0, + `language_id` int(11) NOT NULL DEFAULT 0, + `subject` varchar(255) NOT NULL, + `message_text` longtext NOT NULL, + `message_html` longtext DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`email_template_id`,`language_id`), + KEY `fk_emt_et_idx` (`email_template_id`,`site_id`), + KEY `fk_emt_lan_idx` (`language_id`), + CONSTRAINT `fk_emt_et` FOREIGN KEY (`email_template_id`, `site_id`) REFERENCES `ab_email_template` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_emt_lan` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_export`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_export` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) NOT NULL DEFAULT '', + `plugin` varchar(128) NOT NULL DEFAULT '', + `active` tinyint(4) DEFAULT NULL, + `url` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`name`), + KEY `fk_exp_set_idx` (`site_id`), + CONSTRAINT `fk_exp_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_export_datamap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_export_datamap` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `export_module_id` bigint(20) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `item_id` bigint(20) DEFAULT NULL, + `module_id` int(11) NOT NULL, + `map_data` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`export_module_id`,`module_id`), + UNIQUE KEY `UNIQUE` (`item_id`,`export_module_id`,`site_id`), + KEY `fk_edm_mod_idx` (`export_module_id`,`site_id`), + KEY `fk_edm_mod_idx1` (`module_id`,`site_id`), + CONSTRAINT `fk_edm_exm` FOREIGN KEY (`export_module_id`, `site_id`) REFERENCES `ab_export_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_edm_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_export_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_export_item` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `export_module_id` bigint(20) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `item_id` bigint(20) NOT NULL DEFAULT 0, + `reference` varchar(64) DEFAULT NULL, + `crc` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`export_module_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`export_module_id`,`item_id`), + KEY `fk_exp_eit_idx` (`export_module_id`,`site_id`), + CONSTRAINT `fk_eit_exm` FOREIGN KEY (`export_module_id`, `site_id`) REFERENCES `ab_export_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_export_module`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_export_module` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `export_id` bigint(20) NOT NULL DEFAULT 0, + `module_id` int(11) NOT NULL DEFAULT 0, + `display` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`export_id`,`module_id`), + KEY `fk_exp_exm_idx` (`export_id`,`site_id`), + KEY `fk_exp_mod_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_exm_exp` FOREIGN KEY (`export_id`, `site_id`) REFERENCES `ab_export` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_exm_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_group` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `pricing` tinyint(4) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `notes` longtext DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_grp_set_idx` (`site_id`), + CONSTRAINT `fk_grp_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_group_method`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_group_method` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `method_id` int(11) NOT NULL DEFAULT 0, + `group_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`site_id`,`method_id`,`group_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_gm_mm_idx` (`method_id`,`site_id`), + KEY `fk_gm_grp_idx` (`group_id`,`site_id`), + CONSTRAINT `fk_gm_grp` FOREIGN KEY (`group_id`, `site_id`) REFERENCES `ab_group` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_gm_mm` FOREIGN KEY (`method_id`, `site_id`) REFERENCES `ab_module_method` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_host_server`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_host_server` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `active` tinyint(4) DEFAULT NULL, + `debug` tinyint(4) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `notes` varchar(255) DEFAULT NULL, + `provision_plugin` varchar(128) DEFAULT NULL, + `provision_plugin_data` longtext DEFAULT NULL, + `max_accounts` int(11) DEFAULT NULL, + `whitelabel_url` varchar(256) DEFAULT NULL, + `manage_url` varchar(256) DEFAULT NULL, + `manage_username` varchar(45) DEFAULT NULL, + `manage_password` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `IDS` (`site_id`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_host_server_affiliate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_host_server_affiliate` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `affiliate_id` bigint(20) NOT NULL, + `host_server_id` int(11) NOT NULL, + `host_username` varchar(45) DEFAULT NULL, + `host_password` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`affiliate_id`,`host_server_id`), + KEY `fk_hsa_aff_idx` (`affiliate_id`,`site_id`), + KEY `fk_hsa_hs_idx` (`host_server_id`,`site_id`), + CONSTRAINT `fk_hsa_aff` FOREIGN KEY (`affiliate_id`, `site_id`) REFERENCES `ab_affiliate` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_hsa_hs` FOREIGN KEY (`host_server_id`, `site_id`) REFERENCES `ab_host_server` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_host_server_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_host_server_id` ( + `id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_host_tld_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_host_tld_id` ( + `id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_import`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_import` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `plugin` varchar(32) DEFAULT NULL, + `action` varchar(32) DEFAULT NULL, + `remote_table` varchar(32) DEFAULT NULL, + `ab_table` varchar(32) DEFAULT NULL, + `remote_id` bigint(20) DEFAULT NULL, + `ab_id` bigint(20) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_invoice`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_invoice` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `process_status` tinyint(4) DEFAULT NULL, + `billing_status` tinyint(4) DEFAULT NULL, + `print_status` tinyint(4) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `account_billing_id` int(11) DEFAULT NULL, + `discount_amt` double DEFAULT NULL, + `due_date` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `reminders` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_inv_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_inv_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_invoice_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_invoice_item` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `service_id` bigint(20) DEFAULT NULL, + `invoice_id` bigint(20) NOT NULL, + `active` tinyint(1) DEFAULT NULL, + `product_id` bigint(20) DEFAULT NULL, + `module_id` int(11) DEFAULT NULL, + `module_ref` bigint(20) DEFAULT NULL, + `quantity` double DEFAULT NULL, + `item_type` tinyint(4) DEFAULT NULL, + `product_name` varchar(128) DEFAULT NULL, + `discount_amt` double DEFAULT NULL, + `price_base` double DEFAULT NULL, + `recurring_schedule` int(11) DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_stop` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`invoice_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_ii_inv_idx` (`invoice_id`,`site_id`), + KEY `fk_ii_pdt_idx` (`product_id`,`site_id`), + KEY `fk_ii_svc_idx` (`service_id`,`site_id`), + KEY `fk_ii_mod_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_ii_inv` FOREIGN KEY (`invoice_id`, `site_id`) REFERENCES `ab_invoice` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ii_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ii_pdt` FOREIGN KEY (`product_id`, `site_id`) REFERENCES `ab_product` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ii_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_invoice_item_discount`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_invoice_item_discount` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `invoice_id` bigint(20) DEFAULT NULL, + `account_id` bigint(20) DEFAULT NULL, + `invoice_item_id` bigint(20) DEFAULT NULL, + `discount` varchar(64) DEFAULT NULL, + `amount` double DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `discounts` (`discount`), + KEY `invoice_id` (`invoice_id`,`invoice_item_id`), + KEY `dates` (`date_orig`), + KEY `accounts` (`account_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_invoice_item_tax`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_invoice_item_tax` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `invoice_item_id` bigint(20) NOT NULL DEFAULT 0, + `tax_id` int(11) NOT NULL DEFAULT 0, + `amount` double NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`site_id`,`invoice_item_id`,`tax_id`), + KEY `fk_iit_ii_idx` (`invoice_item_id`,`site_id`), + KEY `fk_iit_tax_idx` (`tax_id`), + CONSTRAINT `fk_iit_ii` FOREIGN KEY (`invoice_item_id`, `site_id`) REFERENCES `ab_invoice_item` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_iit_tax` FOREIGN KEY (`tax_id`) REFERENCES `ab_tax` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_invoice_memo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_invoice_memo` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `invoice_id` bigint(20) NOT NULL DEFAULT 0, + `account_id` bigint(20) DEFAULT NULL, + `type` varchar(32) DEFAULT NULL, + `memo` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`invoice_id`), + KEY `fk_im_inv_idx` (`invoice_id`,`site_id`), + KEY `fk_im_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_im_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_im_inv` FOREIGN KEY (`invoice_id`, `site_id`) REFERENCES `ab_invoice` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_language`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_language` ( + `id` int(11) NOT NULL, + `name` varchar(45) DEFAULT NULL, + `iso` varchar(5) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`), + UNIQUE KEY `iso_UNIQUE` (`iso`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_log_error`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_log_error` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `account_id` bigint(20) DEFAULT NULL, + `module` varchar(64) DEFAULT NULL, + `method` varchar(64) DEFAULT NULL, + `message` longtext DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_module`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_module` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) NOT NULL DEFAULT '', + `date_orig` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `parent_id` int(11) DEFAULT NULL, + `notes` longtext DEFAULT NULL, + `external` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`name`), + KEY `fk_mod_set_idx` (`site_id`), + KEY `fk_mod_idx` (`parent_id`,`site_id`), + CONSTRAINT `fk_mod` FOREIGN KEY (`parent_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_mod_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_module_method`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_module_method` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `module_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(64) DEFAULT '', + `notes` varchar(128) DEFAULT NULL, + `menu_display` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`module_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + UNIQUE KEY `UNIQUE2` (`site_id`,`module_id`,`name`), + KEY `fk_mm_mod_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_mm_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_module_method_token`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_module_method_token` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `method_id` int(11) NOT NULL DEFAULT 0, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `token` varchar(36) NOT NULL DEFAULT '', + `date_orig` bigint(20) NOT NULL DEFAULT 0, + `date_last` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `uses` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`method_id`,`account_id`), + KEY `fk_mmt_mm_idx` (`method_id`,`site_id`), + KEY `fk_mmt_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_mmt_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_mmt_mm` FOREIGN KEY (`method_id`, `site_id`) REFERENCES `ab_module_method` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_oauth`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_oauth` ( + `id` int(11) NOT NULL, + `site_id` int(11) NOT NULL, + `active` tinyint(4) DEFAULT NULL, + `name` varchar(32) NOT NULL, + `app_id` varchar(128) DEFAULT NULL, + `secret` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `ab_oauth_site_id_name_unique` (`site_id`,`name`), + KEY `fk_o_set_idx` (`site_id`), + CONSTRAINT `fk_o_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_payment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_payment` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `date_payment` bigint(20) DEFAULT NULL, + `checkout_id` int(11) NOT NULL DEFAULT 0, + `checkout_data` varchar(255) DEFAULT NULL, + `total_amt` double DEFAULT NULL, + `fees_amt` double DEFAULT NULL, + `source_id` bigint(20) DEFAULT NULL, + `pending_status` tinyint(4) DEFAULT NULL, + `notes` text DEFAULT NULL, + `ip` varchar(32) DEFAULT NULL, + `pending` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`,`checkout_id`,`account_id`,`site_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_pay_acc_idx` (`account_id`,`site_id`), + KEY `fk_pay_cp_idx` (`checkout_id`,`site_id`), + KEY `fk_pay_acc_b_idx` (`source_id`,`site_id`), + CONSTRAINT `fk_pay_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pay_acc_b` FOREIGN KEY (`source_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pay_co` FOREIGN KEY (`checkout_id`, `site_id`) REFERENCES `ab_checkout` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_payment_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_payment_item` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `payment_id` bigint(20) NOT NULL DEFAULT 0, + `invoice_id` bigint(20) DEFAULT NULL, + `alloc_amt` double DEFAULT NULL, + PRIMARY KEY (`id`,`payment_id`,`site_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_pi_pay_idx` (`payment_id`,`site_id`), + KEY `fk_pi_inv_idx` (`invoice_id`,`site_id`), + CONSTRAINT `fk_pi_inv` FOREIGN KEY (`invoice_id`, `site_id`) REFERENCES `ab_invoice` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pi_pay` FOREIGN KEY (`payment_id`, `site_id`) REFERENCES `ab_payment` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_pivot_product_cat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_pivot_product_cat` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `site_id` int(11) NOT NULL, + `product_id` bigint(20) DEFAULT NULL, + `product_cat_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`product_id`,`product_cat_id`), + KEY `fk_pc_idx` (`product_cat_id`,`site_id`), + KEY `fk_p_idx` (`product_id`,`site_id`), + CONSTRAINT `fk_p` FOREIGN KEY (`product_id`, `site_id`) REFERENCES `ab_product` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pc` FOREIGN KEY (`product_cat_id`, `site_id`) REFERENCES `ab_product_cat` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_product`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_product` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `taxable` tinyint(4) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `position` tinyint(4) DEFAULT NULL, + `cart_multiple` tinyint(4) DEFAULT NULL, + `group_avail` blob DEFAULT NULL, + `avail_category` blob DEFAULT NULL, + `price_type` tinyint(4) DEFAULT NULL, + `price_group` blob DEFAULT NULL, + `price_recurr_default` tinyint(4) DEFAULT NULL, + `price_recurr_day` tinyint(4) DEFAULT NULL, + `price_recurr_weekday` tinyint(4) DEFAULT NULL, + `price_recurr_strict` tinyint(4) DEFAULT NULL, + `prod_plugin_file` varchar(128) DEFAULT NULL, + `prod_plugin_data` blob DEFAULT NULL, + `accounting` varchar(64) DEFAULT NULL, + `model` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_pdt_set_idx` (`site_id`), + CONSTRAINT `fk_pdt_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_product_cat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_product_cat` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `parent_id` int(11) DEFAULT NULL, + `group_avail` blob DEFAULT NULL, + `notes` blob DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `template` varchar(128) DEFAULT NULL, + `position` int(11) DEFAULT NULL, + `recur_schedule` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_pc_set_idx` (`site_id`), + KEY `fk_pc_pc_idx` (`parent_id`), + CONSTRAINT `fk_pc_pc` FOREIGN KEY (`parent_id`) REFERENCES `ab_product_cat` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pc_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_product_cat_translate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_product_cat_translate` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `product_cat_id` int(11) NOT NULL DEFAULT 0, + `language_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) DEFAULT NULL, + `description` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`product_cat_id`,`language_id`), + UNIQUE KEY `UNIQUE` (`site_id`,`product_cat_id`,`language_id`), + KEY `fk_pct_pc_idx` (`product_cat_id`,`site_id`), + KEY `fk_pct_lan_idx` (`language_id`), + CONSTRAINT `fk_pct_lan` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pct_pc` FOREIGN KEY (`product_cat_id`, `site_id`) REFERENCES `ab_product_cat` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_product_translate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_product_translate` ( + `id` int(11) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `product_id` bigint(20) NOT NULL DEFAULT 0, + `language_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(128) DEFAULT NULL, + `description_short` longtext DEFAULT NULL, + `description_full` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`product_id`,`language_id`), + UNIQUE KEY `UNIQUE` (`product_id`,`language_id`,`site_id`), + KEY `fk_pt_p_idx` (`site_id`,`product_id`), + KEY `fk_pt_l_idx` (`language_id`), + CONSTRAINT `fk_pt_l` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_pt_p` FOREIGN KEY (`site_id`, `product_id`) REFERENCES `ab_product` (`site_id`, `id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_record_id`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_record_id` ( + `site_id` int(11) NOT NULL DEFAULT 0, + `module_id` int(11) NOT NULL DEFAULT 0, + `id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`site_id`,`module_id`), + KEY `fk_rid_set_idx` (`site_id`), + KEY `fk_rid_mod_idx` (`module_id`,`site_id`), + CONSTRAINT `fk_rid_mod` FOREIGN KEY (`module_id`, `site_id`) REFERENCES `ab_module` (`id`, `site_id`), + CONSTRAINT `fk_rid_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_rtm`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_rtm` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `name` varchar(64) NOT NULL DEFAULT '', + `parent_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + UNIQUE KEY `uq_name` (`name`), + KEY `fk_rtm_set_idx` (`account_id`,`site_id`), + KEY `fk_rtm_acc_p_idx` (`parent_id`), + CONSTRAINT `fk_rtm_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_rtm_rtm` FOREIGN KEY (`parent_id`) REFERENCES `ab_rtm` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `account_billing_id` bigint(20) DEFAULT NULL, + `product_id` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `suspend_billing` tinyint(4) DEFAULT NULL, + `external_billing` tinyint(4) DEFAULT NULL, + `price` double DEFAULT NULL, + `price_group` int(11) NOT NULL DEFAULT 0, + `price_override` double DEFAULT NULL, + `taxable` tinyint(4) DEFAULT NULL, + `queue` varchar(16) DEFAULT NULL, + `date_last_invoice` bigint(20) DEFAULT NULL, + `date_next_invoice` bigint(20) DEFAULT NULL, + `recur_schedule` int(11) DEFAULT NULL, + `prod_attr` longtext DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_end` bigint(20) DEFAULT NULL, + `orderby_id` int(10) unsigned DEFAULT NULL, + `order_status` varchar(191) DEFAULT NULL, + `order_info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, + `model` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`price_group`), + UNIQUE KEY `UNIQUE` (`site_id`,`id`,`account_id`), + KEY `fk_svc_acc_idx` (`account_id`,`site_id`), + KEY `fk_svc_grp_idx` (`site_id`,`price_group`), + KEY `ab_service_orderby_id_foreign` (`orderby_id`), + CONSTRAINT `ab_service_orderby_id_foreign` FOREIGN KEY (`orderby_id`) REFERENCES `users` (`id`), + CONSTRAINT `fk_svc_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_svc_grp` FOREIGN KEY (`site_id`, `price_group`) REFERENCES `ab_group` (`site_id`, `id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__adsl`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__adsl` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `service_id` bigint(20) NOT NULL DEFAULT 0, + `provided_adsl_plan_id` bigint(20) DEFAULT NULL, + `service_number` varchar(10) DEFAULT NULL, + `service_address` varchar(128) DEFAULT NULL, + `contract_term` int(11) DEFAULT NULL, + `service_connect_date` bigint(20) DEFAULT NULL, + `service_contract_date` bigint(20) DEFAULT NULL, + `service_username` varchar(128) DEFAULT NULL, + `service_password` varchar(16) DEFAULT NULL, + `service_stats_collect` tinyint(4) DEFAULT NULL, + `service_stats_lastupdate` date DEFAULT NULL, + `ipaddress` varchar(45) DEFAULT NULL, + `offpeak_start` time DEFAULT NULL, + `offpeak_end` time DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`service_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + UNIQUE KEY `uq_service_username` (`service_username`), + KEY `fk_service_number` (`service_number`), + KEY `fk_sa_svc_idx` (`service_id`,`site_id`), + KEY `fk_sa_ap_idx` (`provided_adsl_plan_id`,`site_id`), + CONSTRAINT `fk_sa_ap` FOREIGN KEY (`provided_adsl_plan_id`, `site_id`) REFERENCES `ab_adsl_plan` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sa_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__adsl_traffic`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__adsl_traffic` ( + `site_id` int(11) NOT NULL DEFAULT 0, + `date` date NOT NULL, + `service` varchar(128) DEFAULT NULL, + `supplier_id` int(11) NOT NULL, + `up_peak` int(11) DEFAULT NULL, + `up_offpeak` int(11) DEFAULT NULL, + `down_peak` int(11) DEFAULT NULL, + `down_offpeak` int(11) DEFAULT NULL, + `peer` int(11) DEFAULT NULL, + `internal` int(11) DEFAULT NULL, + `time` time DEFAULT NULL, + `ab_service_adsl_id` bigint(20) DEFAULT NULL, + UNIQUE KEY `ab_service__adsl_traffic_ab_service_adsl_id_date_time_unique` (`ab_service_adsl_id`,`date`,`time`), + KEY `in_sat_SERVICE` (`service`), + KEY `in_sat_DATE` (`date`), + KEY `in_sat_SERVICE_DATE` (`service`,`date`), + KEY `fk_sat_as_idx` (`supplier_id`,`site_id`), + CONSTRAINT `ab_service__adsl_traffic_ab_service_adsl_id_foreign` FOREIGN KEY (`ab_service_adsl_id`) REFERENCES `ab_service__adsl` (`id`), + CONSTRAINT `fk_sat_as` FOREIGN KEY (`supplier_id`, `site_id`) REFERENCES `ab_adsl_supplier` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__domain`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__domain` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `service_id` bigint(20) NOT NULL DEFAULT 0, + `domain_tld_id` int(11) NOT NULL DEFAULT 0, + `domain_registrar_id` int(11) NOT NULL DEFAULT 0, + `domain_name` varchar(128) DEFAULT NULL, + `domain_expire` bigint(20) DEFAULT NULL, + `registrar_type` varchar(16) DEFAULT NULL, + `registrar_username` varchar(128) DEFAULT NULL, + `registrar_password` varchar(128) DEFAULT NULL, + `registrar_auth_password` varchar(128) DEFAULT NULL, + `registrar_pending_transfer` varchar(16) DEFAULT NULL, + `registrar_ns` varchar(1024) DEFAULT NULL, + `registrar_lastsync` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`service_id`,`domain_tld_id`,`domain_registrar_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_sd_svc_idx` (`service_id`,`site_id`), + KEY `fk_sd_hrp_idx` (`domain_registrar_id`,`site_id`), + KEY `fk_sd_ht_idx` (`domain_tld_id`,`site_id`), + CONSTRAINT `fk_sd_hrp` FOREIGN KEY (`domain_registrar_id`, `site_id`) REFERENCES `ab_domain_registrar` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sd_ht` FOREIGN KEY (`domain_tld_id`, `site_id`) REFERENCES `ab_domain_tld` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sd_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Contain Service Information for HOST_TLD records'; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__hosting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__hosting` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `service_id` bigint(20) NOT NULL DEFAULT 0, + `domain_tld_id` int(11) NOT NULL DEFAULT 0, + `host_server_id` int(11) NOT NULL DEFAULT 0, + `domain_name` varchar(128) DEFAULT NULL, + `host_expire` bigint(20) DEFAULT NULL, + `host_type` varchar(16) DEFAULT NULL, + `host_username` varchar(45) DEFAULT NULL, + `host_password` varchar(45) DEFAULT NULL, + `ftp_username` varchar(16) DEFAULT NULL, + `ftp_password` varchar(16) DEFAULT NULL, + `server_data` blob DEFAULT NULL, + `server_data_date` text DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`service_id`,`domain_tld_id`,`host_server_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + UNIQUE KEY `uq_ftp_username` (`host_server_id`,`ftp_username`), + KEY `fk_service_id` (`service_id`,`site_id`), + KEY `fk_domain_tld_id` (`domain_tld_id`,`site_id`), + KEY `fk_sh_hs_idx` (`host_server_id`,`site_id`), + CONSTRAINT `fk_sh_hs` FOREIGN KEY (`host_server_id`, `site_id`) REFERENCES `ab_host_server` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sh_ht` FOREIGN KEY (`domain_tld_id`, `site_id`) REFERENCES `ab_domain_tld` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sh_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__ssl`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__ssl` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `service_id` bigint(20) NOT NULL, + `ssl_ca_id` bigint(20) DEFAULT NULL, + `csr` text NOT NULL, + `pk` text DEFAULT NULL, + `cert` text DEFAULT NULL, + PRIMARY KEY (`id`,`service_id`,`site_id`), + UNIQUE KEY `UNIQUE` (`id`,`site_id`), + KEY `fk_ss_svc_idx` (`service_id`,`site_id`), + KEY `fk_ss_sca_idx` (`ssl_ca_id`,`site_id`), + CONSTRAINT `fk_ss_sca` FOREIGN KEY (`ssl_ca_id`, `site_id`) REFERENCES `ab_ssl_ca` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_ss_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service__voip`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service__voip` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `service_id` bigint(20) DEFAULT NULL, + `service_number` varchar(10) DEFAULT NULL, + `service_address` varchar(128) DEFAULT NULL, + `contract_term` int(11) DEFAULT NULL, + `service_connect_date` bigint(20) DEFAULT NULL, + `service_contract_date` bigint(20) DEFAULT NULL, + `service_username` varchar(128) DEFAULT NULL, + `service_password` varchar(32) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service_change`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service_change` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `service_id` bigint(20) NOT NULL, + `product_id` bigint(20) NOT NULL, + `ordered_by` bigint(20) NOT NULL, + `date_ordered` bigint(20) DEFAULT NULL, + `date_effective` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `complete` tinyint(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`service_id`,`product_id`,`ordered_by`), + KEY `fk_s_sc_idx` (`site_id`,`id`), + KEY `fk_s_p_idx` (`site_id`,`product_id`), + KEY `fk_sc_a_idx` (`site_id`,`ordered_by`), + CONSTRAINT `fk_sc_a` FOREIGN KEY (`site_id`, `ordered_by`) REFERENCES `ab_account` (`site_id`, `id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sc_p` FOREIGN KEY (`site_id`, `product_id`) REFERENCES `ab_product` (`site_id`, `id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sc_s` FOREIGN KEY (`site_id`, `id`) REFERENCES `ab_service` (`site_id`, `id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_service_memo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_service_memo` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `service_id` bigint(20) NOT NULL DEFAULT 0, + `account_id` bigint(20) DEFAULT NULL, + `type` varchar(32) DEFAULT NULL, + `memo` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`service_id`), + KEY `fk_sm_svc_idx` (`service_id`,`site_id`), + KEY `fk_sm_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_sm_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sm_svc` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_setup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_setup` ( + `id` int(11) NOT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `country_id` int(11) NOT NULL, + `language_id` int(11) NOT NULL, + `currency_id` int(11) NOT NULL, + `url` varchar(256) NOT NULL DEFAULT '', + `login_expire` int(11) DEFAULT NULL, + `time_format` text DEFAULT NULL, + `date_format` text DEFAULT NULL, + `decimal_place` int(11) DEFAULT NULL, + `module_config` blob DEFAULT NULL, + `site_details` blob DEFAULT NULL, + `admin_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`,`country_id`,`currency_id`,`url`), + KEY `fk_set_cty_idx` (`country_id`), + KEY `fk_set_cur_idx` (`currency_id`), + KEY `fk_set_lan_idx` (`language_id`), + KEY `fk_set_acc_idx` (`admin_id`,`id`), + CONSTRAINT `fk_set_acc` FOREIGN KEY (`admin_id`, `id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_set_cty` FOREIGN KEY (`country_id`) REFERENCES `ab_country` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_set_cur` FOREIGN KEY (`currency_id`) REFERENCES `ab_currency` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_set_lan` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_setup_invoice`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_setup_invoice` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `bill_to_company` tinyint(4) DEFAULT NULL, + `invoice_currency` varchar(8) DEFAULT NULL, + `invoice_decimals` int(11) DEFAULT NULL, + `items_summary_max` int(11) DEFAULT NULL, + `news` text DEFAULT NULL, + `page_type` varchar(8) DEFAULT NULL, + `invoice_delivery` int(11) DEFAULT NULL, + `invoice_show_itemized` tinyint(4) DEFAULT NULL, + `invoice_show_service_dates` tinyint(4) DEFAULT NULL, + `invoice_grace` int(11) DEFAULT NULL, + `invoice_advance_gen` int(11) DEFAULT NULL, + `invoice_terms` int(11) DEFAULT NULL, + `invoice_pdf_plugin` varchar(16) DEFAULT NULL, + `contact_us_url` varchar(64) DEFAULT NULL, + `contact_us_phone` varchar(64) DEFAULT NULL, + `advance_notice` int(11) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_ssl`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_ssl` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `extensions` varchar(64) NOT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_ssl_set_idx` (`site_id`), + CONSTRAINT `fk_ssl_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_ssl_ca`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_ssl_ca` ( + `id` bigint(20) NOT NULL, + `site_id` int(11) NOT NULL, + `account_id` bigint(20) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `sign_pk` text NOT NULL, + `sign_cert` text NOT NULL, + `parent_ssl_ca_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`account_id`), + KEY `fk_sca_idx` (`parent_ssl_ca_id`,`site_id`), + KEY `fk_sca_acc_idx` (`account_id`,`site_id`), + CONSTRAINT `fk_sca` FOREIGN KEY (`parent_ssl_ca_id`, `site_id`) REFERENCES `ab_ssl_ca` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `fk_sca_acc` FOREIGN KEY (`account_id`, `site_id`) REFERENCES `ab_account` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_static_page`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_static_page` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `static_page_category_id` int(11) DEFAULT NULL, + `date_start` bigint(20) DEFAULT NULL, + `date_expire` bigint(20) DEFAULT NULL, + `sort_order` int(11) DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `description` longtext DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `cat` (`static_page_category_id`), + KEY `start` (`date_start`), + KEY `expire` (`date_expire`), + KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_static_page_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_static_page_category` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `group_avail` varchar(255) DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `description` longtext DEFAULT NULL, + `active` tinyint(4) DEFAULT NULL, + `sort_order` int(11) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`), + KEY `name` (`name`), + KEY `status` (`active`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_static_page_translate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_static_page_translate` ( + `id` int(11) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `static_page_id` int(11) DEFAULT NULL, + `language_id` varchar(16) DEFAULT NULL, + `body_intro` longtext DEFAULT NULL, + `body_full` longtext DEFAULT NULL, + `title` varchar(128) DEFAULT NULL, + UNIQUE KEY `IDS` (`site_id`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_task`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_task` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `date_run` bigint(20) DEFAULT NULL, + `active` int(11) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `log` tinyint(4) DEFAULT NULL, + `type` int(11) DEFAULT NULL, + `command` varchar(128) DEFAULT NULL, + `int_min` varchar(32) DEFAULT NULL, + `int_hour` varchar(32) DEFAULT NULL, + `int_month` varchar(32) DEFAULT NULL, + `int_month_day` varchar(32) DEFAULT NULL, + `int_week_day` varchar(32) DEFAULT NULL, + `running` tinyint(4) DEFAULT NULL, + `running_host` varchar(4) DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`), + KEY `fk_tsk_set_idx` (`site_id`), + CONSTRAINT `fk_tsk_set` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_task_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_task_log` ( + `id` bigint(20) NOT NULL DEFAULT 0, + `site_id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `task_id` bigint(20) NOT NULL DEFAULT 0, + `result` tinyint(4) DEFAULT NULL, + `message` blob DEFAULT NULL, + PRIMARY KEY (`id`,`site_id`,`task_id`), + KEY `fk_tl_task` (`task_id`,`site_id`), + CONSTRAINT `fk_tl_t` FOREIGN KEY (`task_id`, `site_id`) REFERENCES `ab_task` (`id`, `site_id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_tax`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_tax` ( + `id` int(11) NOT NULL DEFAULT 0, + `date_orig` bigint(20) DEFAULT NULL, + `date_last` bigint(20) DEFAULT NULL, + `country_id` int(11) NOT NULL DEFAULT 0, + `zone` varchar(128) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `rate` double DEFAULT NULL, + `tax_id_collect` tinyint(4) DEFAULT NULL, + `tax_id_name` varchar(32) DEFAULT NULL, + `tax_id_req` tinyint(4) DEFAULT NULL, + `tax_id_exempt` tinyint(4) DEFAULT NULL, + `tax_id_regex` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQUE` (`country_id`,`zone`), + KEY `fk_tax_cty_idx` (`country_id`), + CONSTRAINT `fk_tax_cty` FOREIGN KEY (`country_id`) REFERENCES `ab_country` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ab_voip_plan`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ab_voip_plan` ( + `id` bigint(20) DEFAULT NULL, + `site_id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `external_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_account` ( + `account_id` bigint(20) NOT NULL, + `site_id` int(11) DEFAULT NULL, + `external_integration_id` int(10) unsigned NOT NULL, + `link` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + UNIQUE KEY `sae` (`site_id`,`account_id`,`external_integration_id`), + KEY `external_account_external_integration_id_foreign` (`external_integration_id`), + KEY `external_account_account_id_foreign` (`account_id`), + CONSTRAINT `external_account_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `ab_account` (`id`), + CONSTRAINT `external_account_external_integration_id_foreign` FOREIGN KEY (`external_integration_id`) REFERENCES `external_integrations` (`id`), + CONSTRAINT `external_account_site_id_foreign` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `external_integrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_integrations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `active` tinyint(1) NOT NULL, + `user_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `external_integrations_user_id_foreign` (`user_id`), + CONSTRAINT `external_integrations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `failed_jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `failed_jobs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, + `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, + `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `invites`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `invites` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `for` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `max` int(11) NOT NULL DEFAULT 1, + `uses` int(11) NOT NULL DEFAULT 0, + `valid_until` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `invites_code_unique` (`code`), + UNIQUE KEY `invites_for_unique` (`for`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `jobs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `attempts` tinyint(3) unsigned NOT NULL, + `reserved_at` int(10) unsigned DEFAULT NULL, + `available_at` int(10) unsigned NOT NULL, + `created_at` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `jobs_queue_index` (`queue`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `migrations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `batch` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_access_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_access_tokens` ( + `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `user_id` int(11) DEFAULT NULL, + `client_id` int(11) NOT NULL, + `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `revoked` tinyint(1) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `expires_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_access_tokens_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_auth_codes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_auth_codes` ( + `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `user_id` int(11) NOT NULL, + `client_id` int(11) NOT NULL, + `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `revoked` tinyint(1) NOT NULL, + `expires_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_clients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_clients` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL, + `personal_access_client` tinyint(1) NOT NULL, + `password_client` tinyint(1) NOT NULL, + `revoked` tinyint(1) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_clients_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_personal_access_clients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_personal_access_clients` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `client_id` int(11) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_personal_access_clients_client_id_index` (`client_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_refresh_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_refresh_tokens` ( + `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `revoked` tinyint(1) NOT NULL, + `expires_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `password_resets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `password_resets` ( + `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + KEY `password_resets_email_index` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `quickbooks_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quickbooks_tokens` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `realm_id` bigint(20) unsigned NOT NULL, + `access_token` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `access_token_expires_at` datetime NOT NULL, + `refresh_token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `refresh_token_expires_at` datetime NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `quickbooks_tokens_user_id_foreign` (`user_id`), + CONSTRAINT `quickbooks_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `service__generic`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `service__generic` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `site_id` int(11) NOT NULL, + `service_id` bigint(20) NOT NULL, + `product_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `service__generic_site_id_service_id_unique` (`site_id`,`service_id`), + KEY `service__generic_service_id_site_id_foreign` (`service_id`,`site_id`), + KEY `service__generic_product_id_site_id_foreign` (`product_id`,`site_id`), + CONSTRAINT `service__generic_product_id_site_id_foreign` FOREIGN KEY (`product_id`, `site_id`) REFERENCES `ab_product` (`id`, `site_id`), + CONSTRAINT `service__generic_service_id_site_id_foreign` FOREIGN KEY (`service_id`, `site_id`) REFERENCES `ab_service` (`id`, `site_id`), + CONSTRAINT `service__generic_site_id_foreign` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `site_details`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `site_details` ( + `site_id` int(11) NOT NULL, + `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + UNIQUE KEY `site_details_site_id_key_unique` (`site_id`,`key`), + CONSTRAINT `site_details_site_id_foreign` FOREIGN KEY (`site_id`) REFERENCES `ab_setup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `site_id` int(11) NOT NULL, + `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `active` tinyint(1) NOT NULL, + `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `firstname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `lastname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, + `country_id` int(11) NOT NULL, + `address1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `address2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `postcode` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `emailable` tinyint(1) NOT NULL DEFAULT 1, + `parent_id` int(10) unsigned DEFAULT NULL, + `language_id` int(11) DEFAULT NULL, + `currency_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `users_site_id_email_unique` (`site_id`,`email`), + KEY `users_parent_id_foreign` (`parent_id`), + KEY `users_language_id_foreign` (`language_id`), + KEY `users_currency_id_foreign` (`currency_id`), + KEY `site_user_id_idx` (`id`,`site_id`), + CONSTRAINT `users_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `ab_currency` (`id`), + CONSTRAINT `users_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `ab_language` (`id`), + CONSTRAINT `users_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `users` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +INSERT INTO `migrations` VALUES (1,'2016_06_01_000001_create_oauth_auth_codes_table',1); +INSERT INTO `migrations` VALUES (2,'2016_06_01_000002_create_oauth_access_tokens_table',1); +INSERT INTO `migrations` VALUES (3,'2016_06_01_000003_create_oauth_refresh_tokens_table',1); +INSERT INTO `migrations` VALUES (4,'2016_06_01_000004_create_oauth_clients_table',1); +INSERT INTO `migrations` VALUES (5,'2016_06_01_000005_create_oauth_personal_access_clients_table',1); +INSERT INTO `migrations` VALUES (6,'2017_04_04_185723_create_invites_table',1); +INSERT INTO `migrations` VALUES (7,'2018_05_14_122513_currency_add_rounding',1); +INSERT INTO `migrations` VALUES (8,'2018_05_20_052944_account_add_remember_token',1); +INSERT INTO `migrations` VALUES (301,'2017_06_18_104531_create_ab_account_billing_table',0); +INSERT INTO `migrations` VALUES (302,'2017_06_18_104531_create_ab_account_group_table',0); +INSERT INTO `migrations` VALUES (303,'2017_06_18_104531_create_ab_account_log_table',0); +INSERT INTO `migrations` VALUES (304,'2017_06_18_104531_create_ab_account_memo_table',0); +INSERT INTO `migrations` VALUES (305,'2017_06_18_104531_create_ab_account_oauth_table',0); +INSERT INTO `migrations` VALUES (306,'2017_06_18_104531_create_ab_account_table',0); +INSERT INTO `migrations` VALUES (307,'2017_06_18_104531_create_ab_adsl_plan_table',0); +INSERT INTO `migrations` VALUES (308,'2017_06_18_104531_create_ab_adsl_supplier_plan_table',0); +INSERT INTO `migrations` VALUES (309,'2017_06_18_104531_create_ab_adsl_supplier_table',0); +INSERT INTO `migrations` VALUES (310,'2017_06_18_104531_create_ab_affiliate_table',0); +INSERT INTO `migrations` VALUES (311,'2017_06_18_104531_create_ab_asset_pool_table',0); +INSERT INTO `migrations` VALUES (312,'2017_06_18_104531_create_ab_asset_table',0); +INSERT INTO `migrations` VALUES (313,'2017_06_18_104531_create_ab_cart_table',0); +INSERT INTO `migrations` VALUES (314,'2017_06_18_104531_create_ab_charge_table',0); +INSERT INTO `migrations` VALUES (315,'2017_06_18_104531_create_ab_checkout_notify_table',0); +INSERT INTO `migrations` VALUES (316,'2017_06_18_104531_create_ab_checkout_table',0); +INSERT INTO `migrations` VALUES (317,'2017_06_18_104531_create_ab_country_table',0); +INSERT INTO `migrations` VALUES (318,'2017_06_18_104531_create_ab_currency_table',0); +INSERT INTO `migrations` VALUES (319,'2017_06_18_104531_create_ab_discount_table',0); +INSERT INTO `migrations` VALUES (320,'2017_06_18_104531_create_ab_domain_registrar_table',0); +INSERT INTO `migrations` VALUES (321,'2017_06_18_104531_create_ab_domain_tld_table',0); +INSERT INTO `migrations` VALUES (322,'2017_06_18_104531_create_ab_email_log_table',0); +INSERT INTO `migrations` VALUES (323,'2017_06_18_104531_create_ab_email_setup_table',0); +INSERT INTO `migrations` VALUES (324,'2017_06_18_104531_create_ab_email_template_table',0); +INSERT INTO `migrations` VALUES (325,'2017_06_18_104531_create_ab_email_template_translate_table',0); +INSERT INTO `migrations` VALUES (326,'2017_06_18_104531_create_ab_export_datamap_table',0); +INSERT INTO `migrations` VALUES (327,'2017_06_18_104531_create_ab_export_item_table',0); +INSERT INTO `migrations` VALUES (328,'2017_06_18_104531_create_ab_export_module_table',0); +INSERT INTO `migrations` VALUES (329,'2017_06_18_104531_create_ab_export_table',0); +INSERT INTO `migrations` VALUES (330,'2017_06_18_104531_create_ab_group_method_table',0); +INSERT INTO `migrations` VALUES (331,'2017_06_18_104531_create_ab_group_table',0); +INSERT INTO `migrations` VALUES (332,'2017_06_18_104531_create_ab_host_server_affiliate_table',0); +INSERT INTO `migrations` VALUES (333,'2017_06_18_104531_create_ab_host_server_id_table',0); +INSERT INTO `migrations` VALUES (334,'2017_06_18_104531_create_ab_host_server_table',0); +INSERT INTO `migrations` VALUES (335,'2017_06_18_104531_create_ab_host_tld_id_table',0); +INSERT INTO `migrations` VALUES (336,'2017_06_18_104531_create_ab_import_table',0); +INSERT INTO `migrations` VALUES (337,'2017_06_18_104531_create_ab_invoice_item_discount_table',0); +INSERT INTO `migrations` VALUES (338,'2017_06_18_104531_create_ab_invoice_item_table',0); +INSERT INTO `migrations` VALUES (339,'2017_06_18_104531_create_ab_invoice_item_tax_table',0); +INSERT INTO `migrations` VALUES (340,'2017_06_18_104531_create_ab_invoice_memo_table',0); +INSERT INTO `migrations` VALUES (341,'2017_06_18_104531_create_ab_invoice_table',0); +INSERT INTO `migrations` VALUES (342,'2017_06_18_104531_create_ab_language_table',0); +INSERT INTO `migrations` VALUES (343,'2017_06_18_104531_create_ab_log_error_table',0); +INSERT INTO `migrations` VALUES (344,'2017_06_18_104531_create_ab_module_method_table',0); +INSERT INTO `migrations` VALUES (345,'2017_06_18_104531_create_ab_module_method_token_table',0); +INSERT INTO `migrations` VALUES (346,'2017_06_18_104531_create_ab_module_table',0); +INSERT INTO `migrations` VALUES (347,'2017_06_18_104531_create_ab_oauth_table',0); +INSERT INTO `migrations` VALUES (348,'2017_06_18_104531_create_ab_payment_item_table',0); +INSERT INTO `migrations` VALUES (349,'2017_06_18_104531_create_ab_payment_table',0); +INSERT INTO `migrations` VALUES (350,'2017_06_18_104531_create_ab_pivot_product_cat_table',0); +INSERT INTO `migrations` VALUES (351,'2017_06_18_104531_create_ab_product_cat_table',0); +INSERT INTO `migrations` VALUES (352,'2017_06_18_104531_create_ab_product_cat_translate_table',0); +INSERT INTO `migrations` VALUES (353,'2017_06_18_104531_create_ab_product_table',0); +INSERT INTO `migrations` VALUES (354,'2017_06_18_104531_create_ab_product_translate_table',0); +INSERT INTO `migrations` VALUES (355,'2017_06_18_104531_create_ab_record_id_table',0); +INSERT INTO `migrations` VALUES (356,'2017_06_18_104531_create_ab_rtm_table',0); +INSERT INTO `migrations` VALUES (357,'2017_06_18_104531_create_ab_service__adsl_table',0); +INSERT INTO `migrations` VALUES (358,'2017_06_18_104531_create_ab_service__adsl_traffic_table',0); +INSERT INTO `migrations` VALUES (359,'2017_06_18_104531_create_ab_service__domain_table',0); +INSERT INTO `migrations` VALUES (360,'2017_06_18_104531_create_ab_service__hosting_table',0); +INSERT INTO `migrations` VALUES (361,'2017_06_18_104531_create_ab_service__ssl_table',0); +INSERT INTO `migrations` VALUES (362,'2017_06_18_104531_create_ab_service__voip_table',0); +INSERT INTO `migrations` VALUES (363,'2017_06_18_104531_create_ab_service_change_table',0); +INSERT INTO `migrations` VALUES (364,'2017_06_18_104531_create_ab_service_memo_table',0); +INSERT INTO `migrations` VALUES (365,'2017_06_18_104531_create_ab_service_table',0); +INSERT INTO `migrations` VALUES (366,'2017_06_18_104531_create_ab_setup_invoice_table',0); +INSERT INTO `migrations` VALUES (367,'2017_06_18_104531_create_ab_setup_table',0); +INSERT INTO `migrations` VALUES (368,'2017_06_18_104531_create_ab_ssl_ca_table',0); +INSERT INTO `migrations` VALUES (369,'2017_06_18_104531_create_ab_ssl_table',0); +INSERT INTO `migrations` VALUES (370,'2017_06_18_104531_create_ab_static_page_category_table',0); +INSERT INTO `migrations` VALUES (371,'2017_06_18_104531_create_ab_static_page_table',0); +INSERT INTO `migrations` VALUES (372,'2017_06_18_104531_create_ab_static_page_translate_table',0); +INSERT INTO `migrations` VALUES (373,'2017_06_18_104531_create_ab_task_log_table',0); +INSERT INTO `migrations` VALUES (374,'2017_06_18_104531_create_ab_task_table',0); +INSERT INTO `migrations` VALUES (375,'2017_06_18_104531_create_ab_tax_table',0); +INSERT INTO `migrations` VALUES (376,'2017_06_18_104531_create_ab_voip_plan_table',0); +INSERT INTO `migrations` VALUES (377,'2017_06_18_104531_create_countries_table',0); +INSERT INTO `migrations` VALUES (378,'2017_06_18_104531_create_currencies_table',0); +INSERT INTO `migrations` VALUES (379,'2017_06_18_104531_create_sites_table',0); +INSERT INTO `migrations` VALUES (381,'2017_06_18_104533_add_foreign_keys_to_ab_account_billing_table',0); +INSERT INTO `migrations` VALUES (382,'2017_06_18_104533_add_foreign_keys_to_ab_account_group_table',0); +INSERT INTO `migrations` VALUES (383,'2017_06_18_104533_add_foreign_keys_to_ab_account_log_table',0); +INSERT INTO `migrations` VALUES (384,'2017_06_18_104533_add_foreign_keys_to_ab_account_oauth_table',0); +INSERT INTO `migrations` VALUES (385,'2017_06_18_104533_add_foreign_keys_to_ab_account_table',0); +INSERT INTO `migrations` VALUES (386,'2017_06_18_104533_add_foreign_keys_to_ab_adsl_plan_table',0); +INSERT INTO `migrations` VALUES (387,'2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_plan_table',0); +INSERT INTO `migrations` VALUES (388,'2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_table',0); +INSERT INTO `migrations` VALUES (389,'2017_06_18_104533_add_foreign_keys_to_ab_affiliate_table',0); +INSERT INTO `migrations` VALUES (390,'2017_06_18_104533_add_foreign_keys_to_ab_cart_table',0); +INSERT INTO `migrations` VALUES (391,'2017_06_18_104533_add_foreign_keys_to_ab_charge_table',0); +INSERT INTO `migrations` VALUES (392,'2017_06_18_104533_add_foreign_keys_to_ab_checkout_notify_table',0); +INSERT INTO `migrations` VALUES (393,'2017_06_18_104533_add_foreign_keys_to_ab_checkout_table',0); +INSERT INTO `migrations` VALUES (394,'2017_06_18_104533_add_foreign_keys_to_ab_currency_table',0); +INSERT INTO `migrations` VALUES (395,'2017_06_18_104533_add_foreign_keys_to_ab_domain_tld_table',0); +INSERT INTO `migrations` VALUES (396,'2017_06_18_104533_add_foreign_keys_to_ab_email_log_table',0); +INSERT INTO `migrations` VALUES (397,'2017_06_18_104533_add_foreign_keys_to_ab_email_setup_table',0); +INSERT INTO `migrations` VALUES (398,'2017_06_18_104533_add_foreign_keys_to_ab_email_template_table',0); +INSERT INTO `migrations` VALUES (399,'2017_06_18_104533_add_foreign_keys_to_ab_email_template_translate_table',0); +INSERT INTO `migrations` VALUES (400,'2017_06_18_104533_add_foreign_keys_to_ab_export_datamap_table',0); +INSERT INTO `migrations` VALUES (401,'2017_06_18_104533_add_foreign_keys_to_ab_export_item_table',0); +INSERT INTO `migrations` VALUES (402,'2017_06_18_104533_add_foreign_keys_to_ab_export_module_table',0); +INSERT INTO `migrations` VALUES (403,'2017_06_18_104533_add_foreign_keys_to_ab_export_table',0); +INSERT INTO `migrations` VALUES (404,'2017_06_18_104533_add_foreign_keys_to_ab_group_method_table',0); +INSERT INTO `migrations` VALUES (405,'2017_06_18_104533_add_foreign_keys_to_ab_group_table',0); +INSERT INTO `migrations` VALUES (406,'2017_06_18_104533_add_foreign_keys_to_ab_host_server_affiliate_table',0); +INSERT INTO `migrations` VALUES (407,'2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_table',0); +INSERT INTO `migrations` VALUES (408,'2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_tax_table',0); +INSERT INTO `migrations` VALUES (409,'2017_06_18_104533_add_foreign_keys_to_ab_invoice_memo_table',0); +INSERT INTO `migrations` VALUES (410,'2017_06_18_104533_add_foreign_keys_to_ab_invoice_table',0); +INSERT INTO `migrations` VALUES (411,'2017_06_18_104533_add_foreign_keys_to_ab_module_method_table',0); +INSERT INTO `migrations` VALUES (412,'2017_06_18_104533_add_foreign_keys_to_ab_module_method_token_table',0); +INSERT INTO `migrations` VALUES (413,'2017_06_18_104533_add_foreign_keys_to_ab_module_table',0); +INSERT INTO `migrations` VALUES (414,'2017_06_18_104533_add_foreign_keys_to_ab_oauth_table',0); +INSERT INTO `migrations` VALUES (415,'2017_06_18_104533_add_foreign_keys_to_ab_payment_item_table',0); +INSERT INTO `migrations` VALUES (416,'2017_06_18_104533_add_foreign_keys_to_ab_payment_table',0); +INSERT INTO `migrations` VALUES (417,'2017_06_18_104533_add_foreign_keys_to_ab_pivot_product_cat_table',0); +INSERT INTO `migrations` VALUES (418,'2017_06_18_104533_add_foreign_keys_to_ab_product_cat_table',0); +INSERT INTO `migrations` VALUES (419,'2017_06_18_104533_add_foreign_keys_to_ab_product_cat_translate_table',0); +INSERT INTO `migrations` VALUES (420,'2017_06_18_104533_add_foreign_keys_to_ab_product_table',0); +INSERT INTO `migrations` VALUES (421,'2017_06_18_104533_add_foreign_keys_to_ab_product_translate_table',0); +INSERT INTO `migrations` VALUES (422,'2017_06_18_104533_add_foreign_keys_to_ab_record_id_table',0); +INSERT INTO `migrations` VALUES (423,'2017_06_18_104533_add_foreign_keys_to_ab_rtm_table',0); +INSERT INTO `migrations` VALUES (424,'2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_table',0); +INSERT INTO `migrations` VALUES (425,'2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_traffic_table',0); +INSERT INTO `migrations` VALUES (426,'2017_06_18_104533_add_foreign_keys_to_ab_service__domain_table',0); +INSERT INTO `migrations` VALUES (427,'2017_06_18_104533_add_foreign_keys_to_ab_service__hosting_table',0); +INSERT INTO `migrations` VALUES (428,'2017_06_18_104533_add_foreign_keys_to_ab_service__ssl_table',0); +INSERT INTO `migrations` VALUES (429,'2017_06_18_104533_add_foreign_keys_to_ab_service_change_table',0); +INSERT INTO `migrations` VALUES (430,'2017_06_18_104533_add_foreign_keys_to_ab_service_memo_table',0); +INSERT INTO `migrations` VALUES (431,'2017_06_18_104533_add_foreign_keys_to_ab_service_table',0); +INSERT INTO `migrations` VALUES (432,'2017_06_18_104533_add_foreign_keys_to_ab_setup_table',0); +INSERT INTO `migrations` VALUES (433,'2017_06_18_104533_add_foreign_keys_to_ab_ssl_ca_table',0); +INSERT INTO `migrations` VALUES (434,'2017_06_18_104533_add_foreign_keys_to_ab_ssl_table',0); +INSERT INTO `migrations` VALUES (435,'2017_06_18_104533_add_foreign_keys_to_ab_task_log_table',0); +INSERT INTO `migrations` VALUES (436,'2017_06_18_104533_add_foreign_keys_to_ab_task_table',0); +INSERT INTO `migrations` VALUES (437,'2017_06_18_104533_add_foreign_keys_to_ab_tax_table',0); +INSERT INTO `migrations` VALUES (438,'2017_06_18_104533_add_foreign_keys_to_countries_table',0); +INSERT INTO `migrations` VALUES (439,'2018_06_18_114830_currency_change_threecode',2); +INSERT INTO `migrations` VALUES (440,'2017_06_18_104531_create_users_table',3); +INSERT INTO `migrations` VALUES (441,'2018_06_22_062015_account_add_user',4); +INSERT INTO `migrations` VALUES (442,'2018_06_22_062022_user_add_heirachy',4); +INSERT INTO `migrations` VALUES (443,'2018_07_10_034223_users_add_language',4); +INSERT INTO `migrations` VALUES (444,'2018_07_28_234942_create_site_details',5); +INSERT INTO `migrations` VALUES (445,'2014_10_12_100000_create_password_resets_table',6); +INSERT INTO `migrations` VALUES (446,'2018_08_10_115648_service_add_status',7); +INSERT INTO `migrations` VALUES (447,'2019_01_24_142111_create_jobs_table',8); +INSERT INTO `migrations` VALUES (448,'2019_01_24_175606_create_failed_jobs_table',9); +INSERT INTO `migrations` VALUES (449,'2019_06_02_163527_add_model_to_service',10); +INSERT INTO `migrations` VALUES (450,'2018_03_11_141103_create_quick_books_tokens_table',11); +INSERT INTO `migrations` VALUES (451,'2019_06_11_160940_add_external',11); +INSERT INTO `migrations` VALUES (452,'2019_06_11_161150_add_external_account',11); +INSERT INTO `migrations` VALUES (453,'2019_06_29_101655_add_model_to_product',12); +INSERT INTO `migrations` VALUES (454,'2019_07_05_092048_add_user_to_accountoauth',12); +INSERT INTO `migrations` VALUES (455,'2020_04_22_231133_change_service_number_adsl',13); +INSERT INTO `migrations` VALUES (456,'2020_05_27_144223_enhance_adsl_traffic',14); +INSERT INTO `migrations` VALUES (457,'2020_07_24_153836_addpending_to_payment',15); +INSERT INTO `migrations` VALUES (458,'2020_12_01_225123_add_service_generic',16);