Make ID fields unsigned

This commit is contained in:
Daniel_I_Am 2020-08-29 12:37:13 +02:00
parent c18b9a9c27
commit 25c2d13ca3
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84
6 changed files with 11 additions and 11 deletions

View File

@ -15,8 +15,8 @@ class CreateFreeCompanyLinksTable extends Migration
{
Schema::create('free_company_links', function (Blueprint $table) {
$table->id();
$table->bigInteger('freeCompanyId')->unique();
$table->bigInteger('discordGuildId')->nullable();
$table->bigInteger('freeCompanyId')->unsigned()->unique();
$table->bigInteger('discordGuildId')->unsigned()->nullable();
$table->string('domainName', 255)->nullable();
});
}

View File

@ -15,9 +15,9 @@ class CreateLinkCodesTable extends Migration
{
Schema::create('link_codes', function (Blueprint $table) {
$table->id();
$table->bigInteger('lodestoneId')->unique();
$table->bigInteger('discordUserId')->nullable();
$table->bigInteger('websiteUserId')->nullable();
$table->bigInteger('lodestoneId')->unsigned()->unique();
$table->bigInteger('discordUserId')->unsigned()->nullable();
$table->bigInteger('websiteUserId')->unsigned()->nullable();
$table->dateTime('expires');
$table->string('code', 128);
});

View File

@ -16,9 +16,9 @@ class CreateUserLinksTable extends Migration
Schema::create('user_links', function (Blueprint $table) {
$table->id();
$table->foreignId('freeCompanyLinkId')->constrained('free_company_links');
$table->bigInteger('lodestoneId')->unique();
$table->bigInteger('discordUserId')->nullable()->unique();
$table->bigInteger('websiteUserId')->nullable();
$table->bigInteger('lodestoneId')->unsigned()->unique();
$table->bigInteger('discordUserId')->unsigned()->nullable()->unique();
$table->bigInteger('websiteUserId')->unsigned()->nullable();
$table->timestamps();
$table->unique(['freeCompanyLinkId', 'websiteUserId']);

View File

@ -18,7 +18,7 @@ class CreateLodestoneCachesTable extends Migration
$table->integer('type');
$table->string('server', 64);
$table->string('name', 255);
$table->bigInteger('lodestoneId');
$table->bigInteger('lodestoneId')->unsigned();
$table->text('content');
$table->timestamps();

View File

@ -16,7 +16,7 @@ class CreateFreeCompanyMembersTable extends Migration
Schema::create('free_company_members', function (Blueprint $table) {
$table->id();
$table->foreignId('freeCompanyLinkId')->constrained('free_company_links');
$table->bigInteger('lodestoneId');
$table->bigInteger('lodestoneId')->unsigned();
$table->string('lastSeenRank', 64);
$table->timestamps();
});

View File

@ -18,7 +18,7 @@ class CreateFreeCompanyRanksTable extends Migration
$table->string('rankName', 64);
$table->foreignId('freeCompanyLinkId')->constrained('free_company_links');
$table->integer('daysRequired');
$table->bigInteger('discordRoleId')->nullable();
$table->bigInteger('discordRoleId')->unsigned()->nullable();
$table->string('websiteRole', 64)->nullable();
$table->unique(['rankName', 'freeCompanyLinkId']);