40 lines
811 B
PHP
40 lines
811 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
||
|
class CreateAbAccountLogTable extends Migration {
|
||
|
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('ab_account_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->string('ip', 32)->nullable();
|
||
|
$table->string('details', 256)->nullable();
|
||
|
$table->primary(['id','site_id','account_id']);
|
||
|
$table->index(['account_id','site_id'], 'fk_al_acc_idx');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::drop('ab_account_log');
|
||
|
}
|
||
|
|
||
|
}
|