1
0
mirror of https://github.com/robonen/education-project.git synced 2026-03-20 02:44:31 +00:00

Новости(CRUD + PhotoStorage)

This commit is contained in:
ashen-1-dev
2020-12-15 19:46:13 +07:00
parent c9b4427d99
commit 459fd1c37d
8 changed files with 15 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ class CreateBankTaskFilesTable extends Migration
*/
public function up()
{
Schema::create('bank_tasks_files', function (Blueprint $table) {
Schema::create('bank_task_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('type');
@@ -23,7 +23,7 @@ class CreateBankTaskFilesTable extends Migration
$table->unsignedInteger('banktask_id');
$table->foreign('banktask_id')
->references('id')->on('bank_tasks')
->onDelete('no action');
->onDelete('cascade');
});
}
@@ -35,6 +35,6 @@ class CreateBankTaskFilesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('bank_tasks_files');
Schema::dropIfExists('bank_task_files');
}
}

View File

@@ -22,7 +22,7 @@ class CreateNewsFilesTable extends Migration
$table->unsignedInteger('news_id');
$table->foreign('news_id')
->references('id')->on('news')
->onDelete('no action');
->onDelete('cascade');
});
}