| Current Path : /home/users/unlimited/www/whatsapp-crm/database/migrations/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/database/migrations/2024_03_20_051154_create_chats_table.php |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateChatsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('chats', function (Blueprint $table) {
$table->bigIncrements('id');
$table->char('uuid', 50)->unique();
$table->integer('organization_id');
$table->string('wam_id', 128)->nullable();
$table->integer('contact_id');
$table->enum('type', ['inbound', 'outbound'])->nullable();
$table->text('metadata');
$table->integer('media_id')->nullable();
$table->string('status', 128);
$table->integer('deleted_by')->nullable();
$table->dateTime('deleted_at')->nullable();
$table->timestamp('created_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('chats');
}
}