Files
timebank-cc-public/database/migrations/2022_08_02_083903_create_accounts_table.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

40 lines
1001 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccountsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accounts', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->integer('limit_min')->nullable();
$table->integer('limit_max')->nullable();
$table->string('accountable_type');
$table->unsignedBigInteger('accountable_id');
$table->integer('cyclos_id')->unique()->nullable();
$table->timestamps();
$table->datetime('inactive_at')->nullable();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accounts');
}
}