Migration complete

This commit is contained in:
2026-06-23 19:24:38 +02:00
parent 279160c1cb
commit 64b26ef059
126 changed files with 8121 additions and 221 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('entry_reviews', function (Blueprint $table) {
$table->id();
$table->foreignId('entry_id')->constrained()->cascadeOnDelete();
$table->string('title', 255);
$table->integer('rating');
$table->text('description');
$table->unsignedBigInteger( 'user_id' ); // xf_user_id
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('entry_reviews');
}
};

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('migration_user_plan', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('wp_user_id')->nullable();
$table->unsignedBigInteger('xf_user_id')->nullable();
$table->string('match_type');
$table->string('email')->nullable();
$table->string('wp_username')->nullable();
$table->string('xf_username')->nullable();
$table->text('note')->nullable();
$table->string('status')->default('pending');
$table->unsignedBigInteger('user_id')->nullable();
$table->timestamps();
$table->index('match_type');
$table->index('status');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migration_user_plan');
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('migration_settings', function (Blueprint $table) {
$table->string('key')->primary();
$table->json('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migration_settings');
}
};

View 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.
*/
public function up(): void
{
Schema::create('migrations_logs', function (Blueprint $table) {
$table->id();
$table->string('source_system');
$table->string('source_table');
$table->unsignedBigInteger('source_id');
$table->string('target_table');
$table->unsignedBigInteger('target_id');
$table->string('status')->default('pending');
$table->dateTime('migrated_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migrations_logs');
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('migration_user_plan', function (Blueprint $table) {
$table->boolean('wp_password_bridge')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('migration_user_plan', function (Blueprint $table) {
$table->dropColumn('wp_password_bridge');
});
}
};

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('migration_game_plan', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('wp_game_id');
$table->unsignedBigInteger('wp_platform_id');
$table->unsignedBigInteger('game_id')->nullable();
$table->unsignedBigInteger('wp_genre_id')->nullable();
$table->unsignedInteger('post_count')->default(0);
$table->boolean('genre_conflict')->default(false);
$table->timestamps();
$table->unique(['wp_game_id', 'wp_platform_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migration_game_plan');
}
};

View File

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('galleries', function (Blueprint $table) {
$table->dropForeign('entry_galleries_entry_id_foreign');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};