Differential D2137 Diff 6769 src/database/migrations/2021_01_14_093842_add_timespan_to_transactions_table.php
Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2021_01_14_093842_add_timespan_to_transactions_table.php
- This file was added.
<?php | |||||
use Illuminate\Database\Migrations\Migration; | |||||
use Illuminate\Database\Schema\Blueprint; | |||||
use Illuminate\Support\Facades\Schema; | |||||
class AddTimespanToTransactionsTable extends Migration | |||||
{ | |||||
/** | |||||
* Run the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function up() | |||||
{ | |||||
Schema::table('transactions', function (Blueprint $table) { | |||||
$table->dateTimeTz('period_start')->nullable(true); | |||||
$table->dateTimeTz('period_end')->nullable(true); | |||||
}); | |||||
machniakUnsubmitted Done Inline Actions
machniak: 1. We're not using dateTimeTz() anywhere, we're using timestamp().
2. We're not using capital… | |||||
Not Done Inline ActionsNot done. The column names are wrong. Also, what happens with the existing records? I think it should be nullable() instead of useCurrent(). machniak: Not done. The column names are wrong. Also, what happens with the existing records? I think it… | |||||
} | |||||
/** | |||||
* Reverse the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function down() | |||||
{ | |||||
Schema::table('transactions', function (Blueprint $table) { | |||||
// | |||||
}); | |||||
Not Done Inline ActionsMissing drop column statements. machniak: Missing drop column statements. | |||||
} | |||||
} |