firefly-iii/app/database/migrations/2014_11_29_135749_transactiongroups.php
2014-12-06 17:37:05 +01:00

43 lines
897 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class Transactiongroups extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transaction_groups');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'transaction_groups', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->integer('user_id')->unsigned();
$table->enum('relation', ['balance']);
// connect reminders to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);
}
}