Compare commits

..

No commits in common. "21d7bbf158b298f50c837ab64a82ba8c014f0a6a" and "978a02c5485a87d722a68d95fc5a1ce974963fa2" have entirely different histories.

6 changed files with 2 additions and 51 deletions

View file

@ -1,7 +1,3 @@
0.6.1
* Fix the ability to rollback migrations.
0.6.0
* Link to a Mailbox the Customers automatically created when fetching e-mails.

View file

@ -19,7 +19,7 @@ You have been warned.
### Install the package with composer
```
composer require "millions-missing-france/freescout-restricted-customers" "0.6.1"
composer require "millions-missing-france/freescout-restricted-customers" "0.6.0"
```
### Edit the application routes

View file

@ -1,7 +1,7 @@
{
"name": "millions-missing-france/freescout-restricted-customers",
"description": "Freescout restricted customers - Restrict access to Freescout customers to specific mailboxes",
"version": "0.6.1",
"version": "0.6.0",
"type": "library",
"license": ["AGPL-3.0-only"],
"authors": [

View file

@ -1,8 +1,4 @@
<?php
/*
SPDX-License-Identifier: AGPL-3.0-only
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;

View file

@ -1,41 +0,0 @@
<?php
/*
SPDX-License-Identifier: AGPL-3.0-only
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Symfony\Component\Console\Output\ConsoleOutput;
use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class DropEmailsOnCustomersDeletion extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::table('emails', function (Blueprint $table) {
// Ensure emails entries are dropped when the related customer entry is deleted.
$table
->foreign('customer_id')
->references('id')
->on('customers')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('emails', function (Blueprint $table) {
// Drop the foreign key constraint.
$table->dropForeign(['customer_id']);
});
}
}