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 new file mode 100644 index 0000000..dfed481 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_billing_table.php @@ -0,0 +1,43 @@ +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 new file mode 100644 index 0000000..2705157 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_group_table.php @@ -0,0 +1,44 @@ +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 new file mode 100644 index 0000000..7b8d52f --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_log_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..49634c7 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_memo_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..7f48869 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_oauth_table.php @@ -0,0 +1,43 @@ +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 new file mode 100644 index 0000000..94fdd27 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_account_table.php @@ -0,0 +1,59 @@ +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 new file mode 100644 index 0000000..635ab2c --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_adsl_plan_table.php @@ -0,0 +1,48 @@ +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 new file mode 100644 index 0000000..2e20fdb --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_plan_table.php @@ -0,0 +1,58 @@ +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 new file mode 100644 index 0000000..830f1a5 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_adsl_supplier_table.php @@ -0,0 +1,45 @@ +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 new file mode 100644 index 0000000..f1d2e30 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_affiliate_table.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..6328fce --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_asset_pool_table.php @@ -0,0 +1,36 @@ +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 new file mode 100644 index 0000000..3149ef3 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_asset_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..dcf5947 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_cart_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..f9e3c85 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_charge_table.php @@ -0,0 +1,52 @@ +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 new file mode 100644 index 0000000..37f19b5 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_checkout_notify_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..3454a42 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_checkout_table.php @@ -0,0 +1,45 @@ +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 new file mode 100644 index 0000000..254ed4b --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_country_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..a8f0430 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_currency_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..0dd4140 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_discount_table.php @@ -0,0 +1,56 @@ +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 new file mode 100644 index 0000000..3da9c83 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_domain_registrar_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..e09ae60 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_domain_tld_table.php @@ -0,0 +1,47 @@ +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 new file mode 100644 index 0000000..02d9a9c --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_email_log_table.php @@ -0,0 +1,49 @@ +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 new file mode 100644 index 0000000..248bb48 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_email_setup_table.php @@ -0,0 +1,52 @@ +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 new file mode 100644 index 0000000..516f6fc --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_email_template_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..5f174f0 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_email_template_translate_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..cacb78b --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_export_datamap_table.php @@ -0,0 +1,44 @@ +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 new file mode 100644 index 0000000..5f29c4c --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_export_item_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..58e7cd9 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_export_module_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..a2c9c29 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_export_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..fe09e89 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_group_method_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..2e22cc5 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_group_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..41e45cd --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_host_server_affiliate_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..102bfb1 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_host_server_id_table.php @@ -0,0 +1,32 @@ +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 new file mode 100644 index 0000000..8aec3f4 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_host_server_table.php @@ -0,0 +1,46 @@ +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 new file mode 100644 index 0000000..f7c0ea9 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_host_tld_id_table.php @@ -0,0 +1,32 @@ +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 new file mode 100644 index 0000000..633b521 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_import_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..9c6b991 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_invoice_item_discount_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..d47e144 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_invoice_item_table.php @@ -0,0 +1,55 @@ +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 new file mode 100644 index 0000000..f0100a5 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_invoice_item_tax_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..908142d --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_invoice_memo_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..5e02c19 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_invoice_table.php @@ -0,0 +1,46 @@ +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 new file mode 100644 index 0000000..c7fd611 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_language_table.php @@ -0,0 +1,34 @@ +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 new file mode 100644 index 0000000..f0df10a --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_log_error_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..84ed63d --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_module_method_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..58b20b6 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_module_method_token_table.php @@ -0,0 +1,43 @@ +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 new file mode 100644 index 0000000..c042374 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_module_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..3e66318 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_oauth_table.php @@ -0,0 +1,38 @@ +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 new file mode 100644 index 0000000..03b7ddc --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_payment_item_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..3d5f971 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_payment_table.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..02e7637 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_pivot_product_cat_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..9456288 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_product_cat_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..823662b --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_product_cat_translate_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..b1fd894 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_product_table.php @@ -0,0 +1,51 @@ +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 new file mode 100644 index 0000000..b136ebd --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_product_translate_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..c9cc2e3 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_record_id_table.php @@ -0,0 +1,36 @@ +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 new file mode 100644 index 0000000..21b8e8e --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_rtm_table.php @@ -0,0 +1,38 @@ +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 new file mode 100644 index 0000000..b254ca0 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__adsl_table.php @@ -0,0 +1,51 @@ +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 new file mode 100644 index 0000000..65fb070 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__adsl_traffic_table.php @@ -0,0 +1,44 @@ +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 new file mode 100644 index 0000000..4f20d7d --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__domain_table.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..e5864ef --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__hosting_table.php @@ -0,0 +1,51 @@ +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 new file mode 100644 index 0000000..066688a --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__ssl_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..f711413 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service__voip_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..0a44caf --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service_change_table.php @@ -0,0 +1,44 @@ +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 new file mode 100644 index 0000000..64eed1a --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service_memo_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..028971c --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_service_table.php @@ -0,0 +1,56 @@ +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 new file mode 100644 index 0000000..33d7cbf --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_setup_invoice_table.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..b5f3453 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_setup_table.php @@ -0,0 +1,47 @@ +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 new file mode 100644 index 0000000..ec20ef0 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_ssl_ca_table.php @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..8b4afd8 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_ssl_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..05fdbbc --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_static_page_category_table.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..c47438a --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_static_page_table.php @@ -0,0 +1,43 @@ +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 new file mode 100644 index 0000000..477052e --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_static_page_translate_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..e889e95 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_task_log_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..23b32e4 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_task_table.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..1ee5bd2 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_tax_table.php @@ -0,0 +1,44 @@ +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 new file mode 100644 index 0000000..af026f8 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_ab_voip_plan_table.php @@ -0,0 +1,33 @@ +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 new file mode 100644 index 0000000..5524875 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_countries_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..e59c66a --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_currencies_table.php @@ -0,0 +1,36 @@ +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_sites_table.php b/database/migrations/2017_06_18_104531_create_sites_table.php new file mode 100644 index 0000000..fd7b382 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_sites_table.php @@ -0,0 +1,45 @@ +increments('id'); + $table->timestamps(); + $table->string('url', 191); + $table->string('name', 191); + $table->string('devurl', 191)->nullable(); + $table->text('aboutus', 65535)->nullable(); + $table->text('address')->nullable(); + $table->string('description', 191)->nullable(); + $table->string('email', 191); + $table->string('phone', 191)->nullable(); + $table->string('fax', 191)->nullable(); + $table->string('logo', 191)->nullable(); + $table->string('favicon', 191)->nullable(); + $table->string('theme', 191); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('sites'); + } + +} diff --git a/database/migrations/2017_06_18_104531_create_users_table.php b/database/migrations/2017_06_18_104531_create_users_table.php new file mode 100644 index 0000000..6124b05 --- /dev/null +++ b/database/migrations/2017_06_18_104531_create_users_table.php @@ -0,0 +1,49 @@ +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 new file mode 100644 index 0000000..21bcf58 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_billing_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..e98ec0d --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_group_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..142148d --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_log_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..b46b0ef --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_oauth_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..222b8ea --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_account_table.php @@ -0,0 +1,43 @@ +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 new file mode 100644 index 0000000..26766e5 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_plan_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..ee676bf --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_plan_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..64517d4 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_adsl_supplier_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..135242c --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_affiliate_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..14bf97b --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_cart_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..7513d64 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_charge_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..d63b706 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_notify_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..6c38d69 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_checkout_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..94fb87a --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_currency_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..f103e6e --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_domain_tld_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..abbf973 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_log_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..62420a1 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_setup_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..ebd8bf8 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..02c53c9 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_email_template_translate_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..7cfca74 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_datamap_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..30f0f27 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_item_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..cdf80fc --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_module_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..88c4691 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_export_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..c2a951c --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_method_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..ec4e2fb --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_group_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..ef79a4b --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_host_server_affiliate_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..1859913 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..a4bee11 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_item_tax_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..f4beecc --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_memo_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..fe253be --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_invoice_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..4db15eb --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..57e87b1 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_method_token_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..eba6c06 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_module_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..85dcbfc --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_oauth_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..b55776c --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_item_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..ced05b7 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_payment_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..c970395 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_pivot_product_cat_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..a84c710 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..b6b6384 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_cat_translate_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..5a03d8c --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..49dc2af --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_product_translate_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..9af824e --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_record_id_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..c5eb439 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_rtm_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..14b4956 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..0c5eedd --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__adsl_traffic_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..71f8ef4 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__domain_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..d412022 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__hosting_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..a13a376 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service__ssl_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..0690fc4 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_change_table.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..bd4dd97 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_memo_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..07e3c2d --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_service_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..097de84 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_setup_table.php @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..4c1ff46 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_ca_table.php @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..c555126 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_ssl_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..bfdd2b8 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_log_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..45972b7 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_task_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..8baebc2 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_ab_tax_table.php @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..d67f1c1 --- /dev/null +++ b/database/migrations/2017_06_18_104533_add_foreign_keys_to_countries_table.php @@ -0,0 +1,35 @@ +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'); + }); + } + +}