Akaunting/database/migrations/2018_04_26_000000_create_re...

38 lines
854 B
PHP
Raw Normal View History

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