feat: add extra info to user tables, so it can be used in api

This commit is contained in:
Repflez 2024-01-02 22:44:56 -07:00
commit 3efdee094e

View file

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Miiverse\DB;
class AddUserExtraInfo extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$schema = DB::getSchemaBuilder();
$schema->table('users', function (Blueprint $table) {
$table->bigInteger('pid')->nullable()->unique();
$table->integer('country_id')->nullable();
$table->integer('region_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$schema = DB::getSchemaBuilder();
$schema->table('users', function (Blueprint $table) {
$table->dropColumn('pid');
$table->dropColumn('country_id');
$table->dropColumn('region_id');
});
}
}