feat: add extra info to user tables, so it can be used in api
This commit is contained in:
parent
069fbbfcea
commit
3efdee094e
1 changed files with 40 additions and 0 deletions
40
database/2024_01_03_031926_add_user_extra_info.php
Normal file
40
database/2024_01_03_031926_add_user_extra_info.php
Normal 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');
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue