Expanded reports

This commit is contained in:
James Cole
2014-12-26 21:08:44 +01:00
parent 290f25f1a0
commit 2d67a3159d
6 changed files with 557 additions and 35 deletions

View File

@@ -13,7 +13,29 @@ class ChangesForV322 extends Migration
*/
public function down()
{
// TODO
// rename tables:
Schema::rename('piggy_bank_repetitions', 'piggybank_repetitions');
Schema::rename('piggy_banks', 'piggybanks');
// rename fields
Schema::table(
'piggy_bank_events', function (Blueprint $table) {
$table->renameColumn('piggy_bank_id', 'piggybank_id');
}
);
Schema::table(
'piggybank_repetitions', function (Blueprint $table) {
$table->renameColumn('piggy_bank_id', 'piggybank_id');
}
);
// remove soft delete to piggy banks
Schema::table(
'piggybanks', function (Blueprint $table) {
$table->dropSoftDeletes();
}
);
}
@@ -28,6 +50,19 @@ class ChangesForV322 extends Migration
Schema::rename('piggybank_repetitions', 'piggy_bank_repetitions');
Schema::rename('piggybanks', 'piggy_banks');
// drop an invalid index.
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->dropIndex('limits_component_id_startdate_repeat_freq_unique');
}
);
// recreate it the correct way:
Schema::table(
'budget_limits', function (Blueprint $table) {
$table->unique(['budget_id', 'startdate', 'repeat_freq'], 'unique_bl_combi');
}
);
// rename fields
Schema::table(
'piggy_bank_events', function (Blueprint $table) {