You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class Authkit2UsersUpdate extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
// These are split up like this as to not cause issues when running
|
|
// against sqlite.
|
|
Schema::table('users', static function(Blueprint $table) {
|
|
$table->dropColumn(['email_verified_at', 'password']);
|
|
});
|
|
Schema::table('users', static function(Blueprint $table) {
|
|
$table->string('authkit_id')->unique();
|
|
$table->text('authkit_access_token');
|
|
$table->text('authkit_refresh_token');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('users', static function(Blueprint $table) {
|
|
$table->dropColumn(['authkit_id', 'authkit_access_token', 'authkit_refresh_token']);
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->string('password');
|
|
});
|
|
}
|
|
}
|
|
|