Optimize tables

This commit is contained in:
2020-04-29 21:16:05 +01:00
parent 7c22894e94
commit f514c4f848
5 changed files with 47 additions and 34 deletions

View File

@@ -15,7 +15,14 @@ class CreateVotesTable extends Migration
{
Schema::create('votes', function (Blueprint $table) {
$table->id();
$table->bigInteger('userID')->unsigned();
$table->enum('allowedVoteType', [
'VOTE_DENY',
'VOTE_APPROVE'
]);
$table->timestamps();
$table->foreign('userID')->references('id')->on('users');
});
}