mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
38 lines
857 B
PHP
38 lines
857 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateShoutboxTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
if (Schema::hasTable('shoutbox')) {
|
|
return;
|
|
}
|
|
Schema::create('shoutbox', function (Blueprint $table) {
|
|
$table->integer('id', true);
|
|
$table->unsignedMediumInteger('userid')->default(0);
|
|
$table->unsignedInteger('date')->default(0);
|
|
$table->text('text');
|
|
$table->enum('type', ['sb', 'hb'])->default('sb');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('shoutbox');
|
|
}
|
|
}
|