char('id', 32); $table->boolean('used')->default(false); $table->char('poll_id', 6); $table->primary('id'); $table->foreign('poll_id')->references('id')->on('polls'); }); } /** * Reverse the migrations. * * @return void */ public function down() { $table->dropForeign(['poll_id']); Schema::dropIfExists('poll_voting_codes'); } }