mirror of
https://github.com/flarum/core.git
synced 2025-05-03 22:21:23 +02:00
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:
parent
be266a73cd
commit
c7efbba0da
migrations
2018_01_11_093900_change_access_tokens_b8_columns.php2018_01_11_095000_change_api_keys_b8_columns.php2018_01_11_155200_change_discussions_b8_columns.php2018_01_15_071800_change_discussions_users_b8_columns.php2018_01_15_072600_change_email_tokens_b8_columns.php2018_01_18_133000_change_notifications_b8_columns.php2018_01_18_135000_change_posts_b8_columns.php2018_07_19_101300_constraints_group_user.php2018_07_19_101301_constraints_group_permission.php2018_07_19_101301_constraints_password_tokens.php
@ -31,7 +31,7 @@ return [
|
||||
$table->dropColumn('created_at');
|
||||
$table->renameColumn('token', 'id');
|
||||
|
||||
$table->dropForeign('access_tokens_user_id_foreign');
|
||||
$table->dropForeign(['user_id']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
@ -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'
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
@ -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']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -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']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -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')
|
||||
|
@ -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'
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
@ -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']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -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']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -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']);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user