mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 20:20:37 -06:00
Fix for #2017
This commit is contained in:
parent
b6ea2f1c64
commit
ed08d299de
@ -45,9 +45,17 @@ class ChangesForV4711 extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
/**
|
||||
* In 4.7.11, I changed the date field to a "datetimetz" field. This wreaks havoc
|
||||
* because apparently MySQL is not actually capable of handling multiple time zones,
|
||||
* only having a server wide time zone setting. Actual database schemes like Postgres
|
||||
* handle this just fine but the combination is unpredictable. So we go back to
|
||||
* datetime (without a time zone) for all database engines because MySQL refuses to play
|
||||
* nice.
|
||||
*/
|
||||
Schema::table(
|
||||
'transaction_journals', function (Blueprint $table) {
|
||||
$table->dateTimeTz('date')->change();
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
|
||||
|
43
database/migrations/2019_02_11_170529_changes_for_v4712.php
Normal file
43
database/migrations/2019_02_11_170529_changes_for_v4712.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ChangesForV4712
|
||||
*/
|
||||
class ChangesForV4712 extends Migration
|
||||
{
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
/**
|
||||
* In 4.7.11, I changed the date field to a "datetimetz" field. This wreaks havoc
|
||||
* because apparently MySQL is not actually capable of handling multiple time zones,
|
||||
* only having a server wide time zone setting. Actual database schemes like Postgres
|
||||
* handle this just fine but the combination is unpredictable. So we go back to
|
||||
* datetime (without a time zone) for all database engines because MySQL refuses to play
|
||||
* nice.
|
||||
*/
|
||||
Schema::table(
|
||||
'transaction_journals', function (Blueprint $table) {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user