akaunting/database/migrations/2018_04_26_000000_create_recurring_table.php

38 lines
854 B
PHP
Raw Normal View History

2018-04-26 02:17:55 +03:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
2018-04-27 17:42:45 +03:00
class CreateRecurringTable extends Migration
2018-04-26 02:17:55 +03:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
2018-04-27 17:42:45 +03:00
Schema::create('recurring', function (Blueprint $table) {
2018-04-26 02:17:55 +03:00
$table->increments('id');
$table->integer('company_id');
2018-04-27 17:42:45 +03:00
$table->morphs('recurable');
2018-04-26 02:17:55 +03:00
$table->string('frequency');
$table->integer('interval')->default(1);
$table->date('started_at');
2018-04-26 18:40:04 +03:00
$table->integer('count')->default(0);
2018-04-26 02:17:55 +03:00
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2018-04-27 17:42:45 +03:00
Schema::drop('recurring');
2018-04-26 02:17:55 +03:00
}
}