fix(migrations): fix PostgresGrammar typeSet and skip MySQL triggers on PostgreSQL
This commit is contained in:
parent
368077449e
commit
ff3ceb9947
|
|
@ -48,11 +48,11 @@ public function up(): void
|
|||
->comment('Giorni di preavviso necessari per la disdetta');
|
||||
|
||||
// Modalità disdetta
|
||||
if (DB::connection()->getDriverName() === 'sqlite') {
|
||||
$table->string('modalita_disdetta')->default('raccomandata_rr');
|
||||
} else {
|
||||
if (DB::connection()->getDriverName() === 'mysql') {
|
||||
$table->set('modalita_disdetta', ['raccomandata', 'raccomandata_rr', 'pec', 'email', 'fax', 'mano'])
|
||||
->default('raccomandata_rr');
|
||||
} else {
|
||||
$table->string('modalita_disdetta')->default('raccomandata_rr');
|
||||
}
|
||||
$table->text('note_disdetta')->nullable()
|
||||
->comment('Note specifiche per la disdetta');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (DB::connection()->getDriverName() !== 'mysql') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Verifica se abbiamo i privilegi per creare trigger
|
||||
try {
|
||||
DB::unprepared('SET SESSION log_bin_trust_function_creators = 1');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user