resetting to short annotation for dropping foreign key constraint, as per docs, must use array notation for this to work

This commit is contained in:
Daniel Klabbers 2018-07-20 09:35:16 +02:00
parent be266a73cd
commit c7efbba0da
10 changed files with 12 additions and 12 deletions

View File

@ -31,7 +31,7 @@ return [
$table->dropColumn('created_at');
$table->renameColumn('token', 'id');
$table->dropForeign('access_tokens_user_id_foreign');
$table->dropForeign(['user_id']);
});
}
];

View File

@ -28,7 +28,7 @@ return [
'down' => function (Builder $schema) {
$schema->table('api_keys', function (Blueprint $table) {
$table->dropForeign('api_keys_user_id_foreign');
$table->dropForeign(['user_id']);
$table->dropColumn('id', 'allowed_ips', 'user_id', 'scopes', 'created_at');
});
}

View File

@ -48,8 +48,8 @@ return [
$table->renameColumn('hidden_user_id', 'hide_user_id');
$table->dropForeign([
'discussions_user_id_foreign', 'discussions_last_posted_user_id_foreign', 'discussions_hidden_user_id_foreign',
'discussions_first_post_id_foreign', 'discussions_last_post_id_foreign'
'user_id', 'last_posted_user_id', 'hidden_user_id',
'first_post_id', 'last_post_id'
]);
});
}

View File

@ -28,7 +28,7 @@ return [
$table->renameColumn('last_read_at', 'read_time');
$table->renameColumn('last_read_post_number', 'read_number');
$table->dropForeign(['discussions_users_user_id_foreign', 'discussions_users_discussion_id_foreign']);
$table->dropForeign(['users_user_id', 'users_discussion_id']);
});
}
];

View File

@ -25,7 +25,7 @@ return [
$schema->table('email_tokens', function (Blueprint $table) {
$table->renameColumn('token', 'id');
$table->dropForeign('email_tokens_user_id_foreign');
$table->dropForeign(['user_id']);
});
}
];

View File

@ -49,7 +49,7 @@ return [
$table->boolean('is_read');
$table->boolean('is_deleted');
$table->dropForeign('notifications_user_id_foreign');
$table->dropForeign(['user_id']);
});
$schema->getConnection()->table('notifications')

View File

@ -42,8 +42,8 @@ return [
$table->mediumText('content')->change();
$table->dropForeign([
'posts_user_id_foreign', 'posts_discussion_id_foreign',
'posts_edited_user_id_foreign', 'posts_hidden_user_id_foreign'
'user_id', 'discussion_id',
'edited_user_id', 'hidden_user_id'
]);
});
}

View File

@ -22,7 +22,7 @@ return [
'down' => function (Builder $schema) {
$schema->table('group_user', function (Blueprint $table) {
$table->dropForeign(['group_user_user_id_foreign', 'group_user_group_id_foreign']);
$table->dropForeign(['user_id', 'group_id']);
});
}
];

View File

@ -21,7 +21,7 @@ return [
'down' => function (Builder $schema) {
$schema->table('group_permission', function (Blueprint $table) {
$table->dropForeign('group_permission_group_id_foreign');
$table->dropForeign(['group_id']);
});
}
];

View File

@ -21,7 +21,7 @@ return [
'down' => function (Builder $schema) {
$schema->table('password_tokens', function (Blueprint $table) {
$table->dropForeign('password_tokens_user_id_foreign');
$table->dropForeign(['user_id']);
});
}
];