Remove FKs correctly
This commit is contained in:
parent
d4bcf0be59
commit
c4b76bf48e
|
@ -49,6 +49,18 @@ class UpdateColumnNames extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('servers', function (Blueprint $table) {
|
Schema::table('servers', function (Blueprint $table) {
|
||||||
|
$table->dropForeign('servers_node_id_foreign');
|
||||||
|
$table->dropForeign('servers_owner_id_foreign');
|
||||||
|
$table->dropForeign('servers_allocation_id_foreign');
|
||||||
|
$table->dropForeign('servers_service_id_foreign');
|
||||||
|
$table->dropForeign('servers_option_id_foreign');
|
||||||
|
|
||||||
|
$table->dropIndex('servers_node_id_foreign');
|
||||||
|
$table->dropIndex('servers_owner_id_foreign');
|
||||||
|
$table->dropIndex('servers_allocation_id_foreign');
|
||||||
|
$table->dropIndex('servers_service_id_foreign');
|
||||||
|
$table->dropIndex('servers_option_id_foreign');
|
||||||
|
|
||||||
$table->renameColumn('node_id', 'node');
|
$table->renameColumn('node_id', 'node');
|
||||||
$table->renameColumn('owner_id', 'owner');
|
$table->renameColumn('owner_id', 'owner');
|
||||||
$table->renameColumn('allocation_id', 'allocation');
|
$table->renameColumn('allocation_id', 'allocation');
|
||||||
|
|
Loading…
Reference in New Issue