0
database/migrations/.gitkeep
Normal file → Executable file
0
database/migrations/.gitkeep
Normal file → Executable file
0
database/migrations/2022_03_07_180241_remove_account_tokens_from_user.php
Normal file → Executable file
0
database/migrations/2022_03_07_180241_remove_account_tokens_from_user.php
Normal file → Executable file
34
database/migrations/2022_08_14_210735_add_registration_i_p_to_user.php
Executable file
34
database/migrations/2022_08_14_210735_add_registration_i_p_to_user.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->renameColumn('originalIP', 'currentIp');
|
||||
$table->ipAddress('registrationIp')->after('originalIP');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->renameColumn('currentIp', 'originalIP');
|
||||
$table->removeColumn('ipAddress');
|
||||
});
|
||||
}
|
||||
};
|
41
database/migrations/2022_08_20_195538_add_discord_to_users.php
Executable file
41
database/migrations/2022_08_20_195538_add_discord_to_users.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
|
||||
$table->string('password')->nullable()->change(); // social login requires no pw (still required upon normal reg)
|
||||
$table->string('registrationIp')->nullable()->change();
|
||||
|
||||
$table->unsignedBigInteger('discord_user_id')->after('remember_token')->nullable();
|
||||
$table->longText('discord_token')->after('discord_user_id')->nullable();
|
||||
$table->longText('discord_refresh_token')->after('discord_token')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('discord_token', 'discord_refresh_token', 'discord_user_id');
|
||||
|
||||
$table->string('password')->nullable(false)->change();
|
||||
$table->string('registrationIp')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
22
database/migrations/2022_08_27_052451_add_int_profile_pic_to_users.php
Executable file
22
database/migrations/2022_08_27_052451_add_int_profile_pic_to_users.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIntProfilePicToUsers extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->longText('discord_pfp')->after('discord_user_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('discord_pfp');
|
||||
});
|
||||
}
|
||||
}
|
22
database/migrations/2022_09_04_133123_add_locale_to_users.php
Executable file
22
database/migrations/2022_09_04_133123_add_locale_to_users.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddLocaleToUsers extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('locale')->after('email')->default('en-US');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('locale');
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateVacancyIntegrationNullable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->string('permissionGroupName')->nullable()->change();
|
||||
$table->string('discordRoleID')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->string('permissionGroupName')->nullable(false)->change();
|
||||
$table->string('discordRoleID')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddDiscordRequirementToVacancies extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->boolean('requiresDiscord')
|
||||
->default(false)
|
||||
->after('vacancyStatus');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->dropColumn('requiresDiscord');
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddRequiredAgeToVacancies extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->integer('requiredAge')->default(16)->after('vacancyStatus');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
$table->dropColumn('requiredAge');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user