setup wizard refactoring

This commit is contained in:
Čarodej
2022-04-27 11:42:28 +02:00
parent 39c94473c8
commit 08ee6567bc
21 changed files with 51 additions and 527 deletions

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateWebSocketsStatisticsEntriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('websockets_statistics_entries', function (Blueprint $table) {
$table->increments('id');
$table->string('app_id');
$table->integer('peak_connection_count');
$table->integer('websocket_message_count');
$table->integer('api_message_count');
$table->nullableTimestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('websockets_statistics_entries');
}
}

View File

@@ -22,6 +22,7 @@ class CreateUsersTable extends Migration
$table->string('password')->nullable();
$table->text('two_factor_secret')->nullable();
$table->text('two_factor_recovery_codes')->nullable();
$table->timestamp('two_factor_confirmed_at')->nullable();
$table->rememberToken();
$table->timestamps();
$table->charset = 'utf8mb4';

View File

@@ -16,6 +16,7 @@ class CreateFilesTable extends Migration
Schema::create('files', function (Blueprint $table) {
$table->uuid('id')->primary()->index();
$table->uuid('user_id')->index();
$table->uuid('creator_id')->nullable();
$table->uuid('parent_id')->nullable();
$table->text('name');
@@ -26,8 +27,6 @@ class CreateFilesTable extends Migration
$table->text('type')->nullable();
$table->enum('author', ['user', 'member', 'visitor'])->default('user');
$table->softDeletes();
$table->timestamps();

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pages', function (Blueprint $table) {
$table->string('slug')->index();
$table->string('title');
$table->boolean('visibility');
$table->longText('content');
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pages');
}
}

View File

@@ -15,7 +15,7 @@ class CreateExifsTable extends Migration
{
Schema::create('exifs', function (Blueprint $table) {
$table->uuid('id')->primary()->index();
$table->uuid('file_id')->index();
$table->uuid('file_id')->nullable()->index();
$table->timestamp('date_time_original')->nullable();
$table->string('artist')->nullable();

View File

@@ -1,36 +0,0 @@
<?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('files', function (Blueprint $table) {
$table->dropColumn('author');
});
Schema::table('files', function (Blueprint $table) {
$table->uuid('creator_id')->after('user_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('files', function (Blueprint $table) {
$table->dropColumn('creator_id');
});
}
};

View File

@@ -1,34 +0,0 @@
<?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->timestamp('two_factor_confirmed_at')
->after('two_factor_recovery_codes')
->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('two_factor_confirmed_at');
});
}
};

View File

@@ -1,30 +0,0 @@
<?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('exifs', function (Blueprint $table) {
$table->uuid('file_id')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
};