id(); $table->timestamps(); $table->smallInteger("year"); $table->string("name", 128); $table->boolean("is_expense"); $table->unsignedBigInteger('category_id'); $table->foreign('category_id')->references('id')->on('categories'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } }