mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Updated foreign keys
Updated foreign keys: Removed location, provider and OS id keys
This commit is contained in:
parent
f9e6ec1da3
commit
fb22a50ff6
@ -9,26 +9,26 @@ class AddForeignKeys extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('servers', function (Blueprint $table) {
|
Schema::table('servers', function (Blueprint $table) {
|
||||||
$table->foreign('location_id','servers_fk_location')->references('id')->on('locations');
|
//$table->foreign('location_id','servers_fk_location')->references('id')->on('locations');
|
||||||
$table->foreign('provider_id','servers_fk_provider')->references('id')->on('providers');
|
//$table->foreign('provider_id','servers_fk_provider')->references('id')->on('providers');
|
||||||
$table->foreign('os_id','servers_fk_os')->references('id')->on('os');
|
//$table->foreign('os_id','servers_fk_os')->references('id')->on('os');
|
||||||
$table->foreign('id', 'servers_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
$table->foreign('id', 'servers_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('shared_hosting', function (Blueprint $table) {
|
Schema::table('shared_hosting', function (Blueprint $table) {
|
||||||
$table->foreign('location_id','shared_fk_location')->references('id')->on('locations');
|
//$table->foreign('location_id','shared_fk_location')->references('id')->on('locations');
|
||||||
$table->foreign('provider_id','shared_fk_provider')->references('id')->on('providers');
|
//$table->foreign('provider_id','shared_fk_provider')->references('id')->on('providers');
|
||||||
$table->foreign('id', 'shared_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
$table->foreign('id', 'shared_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('reseller_hosting', function (Blueprint $table) {
|
Schema::table('reseller_hosting', function (Blueprint $table) {
|
||||||
$table->foreign('location_id','reseller_fk_location')->references('id')->on('locations');
|
//$table->foreign('location_id','reseller_fk_location')->references('id')->on('locations');
|
||||||
$table->foreign('provider_id','reseller_fk_provider')->references('id')->on('providers');
|
//$table->foreign('provider_id','reseller_fk_provider')->references('id')->on('providers');
|
||||||
$table->foreign('id', 'reseller_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
$table->foreign('id', 'reseller_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('domains', function (Blueprint $table) {
|
Schema::table('domains', function (Blueprint $table) {
|
||||||
$table->foreign('provider_id','domains_fk_provider')->references('id')->on('providers');
|
//$table->foreign('provider_id','domains_fk_provider')->references('id')->on('providers');
|
||||||
$table->foreign('id', 'domains_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
$table->foreign('id', 'domains_fk_pricing')->references('service_id')->on('pricings')->onDelete('cascade');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user