mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update polls migration, add group support
This commit is contained in:
parent
7709220074
commit
bc53ac2af8
1 changed files with 32 additions and 31 deletions
|
@ -6,36 +6,37 @@ use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreatePollsTable extends Migration
|
class CreatePollsTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('polls', function (Blueprint $table) {
|
Schema::create('polls', function (Blueprint $table) {
|
||||||
$table->bigInteger('id')->unsigned()->primary();
|
$table->bigInteger('id')->unsigned()->primary();
|
||||||
$table->bigInteger('story_id')->unsigned()->nullable()->index();
|
$table->bigInteger('story_id')->unsigned()->nullable()->index();
|
||||||
$table->bigInteger('status_id')->unsigned()->nullable()->index();
|
$table->bigInteger('status_id')->unsigned()->nullable()->index();
|
||||||
$table->bigInteger('profile_id')->unsigned()->index();
|
$table->bigInteger('group_id')->unsigned()->nullable()->index();
|
||||||
$table->json('poll_options')->nullable();
|
$table->bigInteger('profile_id')->unsigned()->index();
|
||||||
$table->json('cached_tallies')->nullable();
|
$table->json('poll_options')->nullable();
|
||||||
$table->boolean('multiple')->default(false);
|
$table->json('cached_tallies')->nullable();
|
||||||
$table->boolean('hide_totals')->default(false);
|
$table->boolean('multiple')->default(false);
|
||||||
$table->unsignedInteger('votes_count')->default(0);
|
$table->boolean('hide_totals')->default(false);
|
||||||
$table->timestamp('last_fetched_at')->nullable();
|
$table->unsignedInteger('votes_count')->default(0);
|
||||||
$table->timestamp('expires_at')->nullable();
|
$table->timestamp('last_fetched_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamp('expires_at')->nullable();
|
||||||
});
|
$table->timestamps();
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('polls');
|
Schema::dropIfExists('polls');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue