41 lines
		
	
	
		
			997 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			997 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Illuminate\Database\Migrations\Migration;
 | |
| use Illuminate\Database\Schema\Blueprint;
 | |
| use Illuminate\Support\Facades\Schema;
 | |
| 
 | |
| class CreateArticlesTable extends Migration
 | |
| {
 | |
|     /**
 | |
|      * Run the migrations.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function up()
 | |
|     {
 | |
|         Schema::create('articles', function (Blueprint $table) {
 | |
|             $table->uuid('id')->primary();
 | |
|             $table->string('title');
 | |
|             $table->string('url');
 | |
|             $table->string('author')->nullable();
 | |
|             $table->string('featured_image');
 | |
|             $table->text('body');
 | |
|             $table->string("guid")->nullable();
 | |
|             $table->unsignedBigInteger('source_id');
 | |
|             $table->dateTime('published_date');
 | |
|             $table->json('meta')->nullable();
 | |
|             $table->timestamps();
 | |
|         });
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Reverse the migrations.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function down()
 | |
|     {
 | |
|         Schema::dropIfExists('articles');
 | |
|     }
 | |
| }
 |