mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-09 07:33:06 -06:00
43 lines
897 B
PHP
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');
|
|
}
|
|
);
|
|
|
|
|
|
}
|
|
|
|
}
|