mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed the build by adding new migrations for each step.
This commit is contained in:
parent
da1bc18a47
commit
51ae130922
@ -33,18 +33,6 @@ class ChangesForV3310 extends Migration
|
||||
}
|
||||
);
|
||||
|
||||
Schema::table(
|
||||
'transaction_groups', function (Blueprint $table) {
|
||||
|
||||
// drop column "relation"
|
||||
$table->string('relation', 50);
|
||||
}
|
||||
);
|
||||
// make new column "relation"
|
||||
|
||||
// set all current entries to be "balance"
|
||||
DB::table('transaction_groups')->update(['relation' => 'balance']);
|
||||
|
||||
/*
|
||||
* New table!
|
||||
*/
|
||||
@ -62,7 +50,6 @@ class ChangesForV3310 extends Migration
|
||||
$table->decimal('longitude', 18, 12)->nullable();
|
||||
$table->smallInteger('zoomLevel', false, true)->nullable();
|
||||
|
||||
|
||||
// connect reminders to users
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
}
|
||||
|
40
database/migrations/2015_04_28_075215_changes_for_v3310a.php
Normal file
40
database/migrations/2015_04_28_075215_changes_for_v3310a.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV3310a
|
||||
*/
|
||||
class ChangesForV3310a extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table(
|
||||
'transaction_groups', function (Blueprint $table) {
|
||||
|
||||
// new column, relation.
|
||||
$table->string('relation', 50)->nullable();
|
||||
}
|
||||
);
|
||||
// make new column "relation"
|
||||
|
||||
}
|
||||
|
||||
}
|
32
database/migrations/2015_04_28_075317_changes_for_v3310b.php
Normal file
32
database/migrations/2015_04_28_075317_changes_for_v3310b.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Class ChangesForV3310b
|
||||
*/
|
||||
class ChangesForV3310b extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// set all current entries to be "balance"
|
||||
DB::table('transaction_groups')->update(['relation' => 'balance']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user