From bc53ac2af8518706b5e5b5efe0da0515f0423fbd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 10 Aug 2021 22:25:42 -0600 Subject: [PATCH] Update polls migration, add group support --- .../2021_07_29_014835_create_polls_table.php | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/database/migrations/2021_07_29_014835_create_polls_table.php b/database/migrations/2021_07_29_014835_create_polls_table.php index d7cd636fc..0ae7a58ad 100644 --- a/database/migrations/2021_07_29_014835_create_polls_table.php +++ b/database/migrations/2021_07_29_014835_create_polls_table.php @@ -6,36 +6,37 @@ use Illuminate\Support\Facades\Schema; class CreatePollsTable extends Migration { - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('polls', function (Blueprint $table) { - $table->bigInteger('id')->unsigned()->primary(); - $table->bigInteger('story_id')->unsigned()->nullable()->index(); - $table->bigInteger('status_id')->unsigned()->nullable()->index(); - $table->bigInteger('profile_id')->unsigned()->index(); - $table->json('poll_options')->nullable(); - $table->json('cached_tallies')->nullable(); - $table->boolean('multiple')->default(false); - $table->boolean('hide_totals')->default(false); - $table->unsignedInteger('votes_count')->default(0); - $table->timestamp('last_fetched_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('polls', function (Blueprint $table) { + $table->bigInteger('id')->unsigned()->primary(); + $table->bigInteger('story_id')->unsigned()->nullable()->index(); + $table->bigInteger('status_id')->unsigned()->nullable()->index(); + $table->bigInteger('group_id')->unsigned()->nullable()->index(); + $table->bigInteger('profile_id')->unsigned()->index(); + $table->json('poll_options')->nullable(); + $table->json('cached_tallies')->nullable(); + $table->boolean('multiple')->default(false); + $table->boolean('hide_totals')->default(false); + $table->unsignedInteger('votes_count')->default(0); + $table->timestamp('last_fetched_at')->nullable(); + $table->timestamp('expires_at')->nullable(); + $table->timestamps(); + }); + } - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('polls'); - } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('polls'); + } }