| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CreatePostsTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Reverse the migrations. |
||
| 11 | */ |
||
| 12 | public function down() |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Run the migrations. |
||
| 19 | */ |
||
| 20 | public function up() |
||
| 21 | { |
||
| 22 | Schema::create('posts', function (Blueprint $table) { |
||
| 23 | $table->bigIncrements('id'); |
||
| 24 | $table->string('title', 255); |
||
| 25 | $table->string('slug', 255); |
||
| 26 | $table->text('text'); |
||
| 27 | $table->datetime('publish_date')->nullable(); |
||
| 28 | $table->tinyInteger('published'); |
||
| 29 | $table->tinyInteger('tweet_sent')->default(0); |
||
| 30 | $table->tinyInteger('posted_on_medium')->default(0); |
||
| 31 | $table->string('author', 255); |
||
| 32 | $table->timestamp('created_at')->nullable(); |
||
| 33 | $table->timestamp('updated_at')->nullable(); |
||
| 34 | $table->tinyInteger('original_content')->default(0); |
||
| 35 | $table->string('external_url', 255)->nullable(); |
||
| 36 | $table->string('tweet_url', 255)->nullable(); |
||
| 37 | }); |
||
| 40 |