我想创建一个将删除表的迁移.我创建了这样的迁移:
Schema::table('devices', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('client_id')->nullable();
$table->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
});
Run Code Online (Sandbox Code Playgroud)
现在我试着像这样放弃它:
Schema::table('devices', function (Blueprint $table) {
$table->dropForeign('devices_client_id_foreign');
$table->drop('devices');
});
Run Code Online (Sandbox Code Playgroud)
但我得到以下错误:
Run Code Online (Sandbox Code Playgroud)In Connection.php line 664: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'devices_client_id_foreign'; check that column/key exists (SQL:alter table
devicesdrop foreign keydevices_client_id_foreign)Run Code Online (Sandbox Code Playgroud)In PDOStatement.php line 144: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'devices_client_id_foreign'; check that column/key exists In PDOStatement.php line 142: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'devices_client_id_foreign'; check …
我有两个组件,一个卡片组件和一个模态组件,模态组件包含模态元素,在我的卡片组件中,我想要一个按钮来打开我的模态组件的模态窗口。我该如何管理,到目前为止我已经做到了:
我的卡片组件:
<template>
<v-layout v-if="visible">
<v-flex xs12 sm6 offset-sm3>
<v-card>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0">test</h3>
<div>test</div>
</div>
</v-card-title>
<v-divider light></v-divider>
<v-card-actions>
<v-btn
color="primary"
dark
@click="dialog = true"
>
Open Dialog
</v-btn> <!-- open modal dialog of modal component? -->
<tenant-number-modal></tenant-number-modal>
</v-card-actions>
<input type="hidden" id="tenant-id" :value=tenantId>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
export default {
data () {
return {
visible: true,
dialog: false,
uniqueTenantNumber: ''
}
},
}
</script>
Run Code Online (Sandbox Code Playgroud)
我的模态组件:
<template>
<v-layout row justify-center>
<v-btn
color="primary"
dark
@click="dialog = true" …Run Code Online (Sandbox Code Playgroud) 我有一个到 bitbucket 的基本 git clone 命令,我必须在其中添加登录凭据,是否可以将登录凭据添加到 bitbucket git clone 命令?
https://myacc@bitbucket.org/myacc/app.git
Run Code Online (Sandbox Code Playgroud)
像这样的东西?
https://myacc@bitbucket.org/myacc/app.git -Password "123"
Run Code Online (Sandbox Code Playgroud) bitbucket ×1
git ×1
git-clone ×1
javascript ×1
laravel ×1
laravel-5.6 ×1
mysql ×1
php ×1
vue.js ×1
vuejs2 ×1