restore composer.json, add mysqli extension
This commit is contained in:
41
database/migrations/2020_08_11_121829_create_posts_table.php
Executable file
41
database/migrations/2020_08_11_121829_create_posts_table.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePostsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('posts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('language', 10)->default('ru');
|
||||
$table->text('content');
|
||||
$table->boolean('topped')->default(false);
|
||||
$table->string('image');
|
||||
$table->enum('type', ['news', 'article', 'sales', 'media']);
|
||||
$table->text('keywords')->nullable();
|
||||
$table->text('descriptions')->nullable();
|
||||
$table->unsignedInteger('views')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('posts');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user