osb/database/migrations/2017_06_18_104531_create_ab_email_log_table.php
2018-06-18 21:18:34 +10:00

50 lines
1.3 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbEmailLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_email_log', function(Blueprint $table)
{
$table->bigInteger('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('account_id')->default(0);
$table->bigInteger('email_template_translate_id')->nullable();
$table->string('email', 128)->nullable();
$table->string('subject', 128)->nullable();
$table->text('message')->nullable();
$table->boolean('html')->nullable();
$table->boolean('urgent')->nullable();
$table->boolean('userread')->nullable();
$table->binary('data', 65535)->nullable();
$table->integer('module_id')->nullable();
$table->string('module_data', 128)->nullable();
$table->primary(['id','site_id','account_id']);
$table->index(['email_template_translate_id','site_id'], 'fk_el_ett_idx');
$table->index(['account_id','site_id'], 'fk_el_acc_idx');
$table->index(['module_id','site_id'], 'fk_el_mod_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_email_log');
}
}