opnform/database/migrations/2021_05_17_142505_create_wo...

36 lines
785 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateWorkspacesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('workspaces', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('access_token');
$table->string('name');
$table->text('icon')->nullable();
$table->foreignIdFor(\App\Models\User::class, 'user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('workspaces');
}
}