This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSmsEnvioTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sms_envio', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('to', 13);
|
||||
$table->text('message');
|
||||
$table->string('sms_id')->unique();
|
||||
$table->unsignedTinyInteger('number_of_parts');
|
||||
$table->timestampTz('schedule')->nullable();
|
||||
$table->unsignedBigInteger('aggregated_id')->nullable();
|
||||
$table->string('status_code', 2);
|
||||
$table->string('status_description', 100);
|
||||
$table->string('detail_code', 3);
|
||||
$table->string('detail_description', 100);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sms_envio');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSmsCancelamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sms_cancelamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('sms_envio_id')->constrained('sms_envio');
|
||||
$table->unsignedTinyInteger('part');
|
||||
$table->string('status_code', 2);
|
||||
$table->string('status_description', 100);
|
||||
$table->string('detail_code', 3);
|
||||
$table->string('detail_description', 100);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sms_cancelamento');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user