Fixed tests. Broke database.

This commit is contained in:
James Cole 2015-06-22 22:04:46 +02:00
parent f01bbefc1f
commit 1511f75a80
7 changed files with 2 additions and 137 deletions

View File

@ -42,9 +42,6 @@ class CreatePiggybanksTable extends Migration
$table->enum('rep_length', ['day', 'week', 'quarter', 'month', 'year'])->nullable();
$table->smallInteger('rep_every')->unsigned();
$table->smallInteger('rep_times')->unsigned()->nullable();
$table->enum('reminder', ['day', 'week', 'quarter', 'month', 'year'])->nullable();
$table->smallInteger('reminder_skip')->unsigned();
$table->boolean('remind_me');
$table->integer('order')->unsigned();
// connect account to piggy bank.

View File

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*
* Class CreateRemindersTable
*
*/
class CreateRemindersTable extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('reminders');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'reminders', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('user_id')->unsigned();
$table->date('startdate');
$table->date('enddate')->nullable();
$table->boolean('active');
$table->boolean('notnow')->default(0);
$table->integer('remindersable_id')->unsigned()->nullable();
$table->string('remindersable_type')->nullable();
// connect reminders to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);
}
}

View File

@ -37,7 +37,7 @@ class CreateTransactionGroupsTable extends Migration
$table->integer('user_id')->unsigned();
$table->enum('relation', ['balance']);
// connect reminders to users
// connect groups to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);

View File

@ -35,15 +35,6 @@ class ChangesForV332 extends Migration
}
);
Schema::table(
'reminders', function (Blueprint $table) {
$table->text('metadata')->nullable();
}
);
}
}

View File

@ -226,17 +226,6 @@ class ChangesForV336 extends Migration
}
);
/**
* REMINDERS
*/
Schema::table(
'reminders', function (Blueprint $table) {
$table->smallInteger('encrypted', false, true)->default(0);
}
);
}
}

View File

@ -57,7 +57,7 @@ class ChangesForV3310 extends Migration
$table->decimal('longitude', 18, 12)->nullable();
$table->smallInteger('zoomLevel', false, true)->nullable();
// connect reminders to users
// connect tags to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);

View File

@ -1,62 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Class ChangesForV3451
*/
class ChangesForV3451 extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::create(
'reminders', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('user_id')->unsigned();
$table->date('startdate');
$table->date('enddate')->nullable();
$table->boolean('active');
$table->boolean('notnow')->default(0);
$table->integer('remindersable_id')->unsigned()->nullable();
$table->string('remindersable_type')->nullable();
// connect reminders to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);
Schema::table(
'piggy_banks', function (Blueprint $table) {
//$table->smallInteger('reminder_skip')->unsigned();
//$table->boolean('remind_me');
$table->enum('reminder', ['day', 'week', 'quarter', 'month', 'year'])->nullable();
}
);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(
'piggy_banks', function (Blueprint $table) {
//$table->dropColumn('reminder_skip');
//$table->dropColumn('remind_me');
$table->dropColumn('reminder');
}
);
Schema::drop('reminders');
}
}