mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 00:31:41 +08: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
@ -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