Initial commit to new repo
This commit is contained in:
parent
a267f9bfcc
commit
a5173c981b
292 changed files with 17472 additions and 0 deletions
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateArticlesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (! Schema::hasTable('articles')) {
|
||||
Schema::create('articles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('titleurl', 50)->unique();
|
||||
$table->string('url', 120)->nullable();
|
||||
$table->string('title');
|
||||
$table->longText('main');
|
||||
$table->tinyInteger('published')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('articles');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue