mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Adjusts migration constraints
This commit is contained in:
parent
56b1f3e523
commit
aae4a7e7ea
@ -14,12 +14,20 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('hub_id')->nullable()->default(null)->unique();
|
||||
$table->bigInteger('hub_id')
|
||||
->nullable()
|
||||
->default(null)
|
||||
->unique();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->foreignIdFor(UserRole::class)->nullable()->default(null)->constrained('user_roles');
|
||||
$table->foreignIdFor(UserRole::class)
|
||||
->nullable()
|
||||
->default(null)
|
||||
->constrained('user_roles')
|
||||
->nullOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->rememberToken();
|
||||
$table->string('profile_photo_path', 2048)->nullable();
|
||||
$table->timestamps();
|
||||
|
@ -12,14 +12,25 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('mods', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('hub_id')->nullable()->default(null)->unique();
|
||||
$table->foreignIdFor(User::class)->constrained('users');
|
||||
$table->bigInteger('hub_id')
|
||||
->nullable()
|
||||
->default(null)
|
||||
->unique();
|
||||
$table->foreignIdFor(User::class)
|
||||
->constrained('users')
|
||||
->cascadeOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('teaser');
|
||||
$table->longText('description');
|
||||
$table->string('thumbnail')->default('');
|
||||
$table->foreignIdFor(License::class)->nullable()->default(null)->constrained('licenses');
|
||||
$table->foreignIdFor(License::class)
|
||||
->nullable()
|
||||
->default(null)
|
||||
->constrained('licenses')
|
||||
->nullOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->string('source_code_link');
|
||||
$table->boolean('featured')->default(false);
|
||||
$table->boolean('contains_ai_content')->default(false);
|
||||
|
@ -10,7 +10,10 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('spt_versions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('hub_id')->nullable()->default(null)->unique();
|
||||
$table->bigInteger('hub_id')
|
||||
->nullable()
|
||||
->default(null)
|
||||
->unique();
|
||||
$table->string('version');
|
||||
$table->string('color_class');
|
||||
$table->softDeletes();
|
||||
|
@ -12,12 +12,23 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('mod_versions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('hub_id')->nullable()->default(null)->unique();
|
||||
$table->foreignIdFor(Mod::class)->constrained('mods');
|
||||
$table->bigInteger('hub_id')
|
||||
->nullable()
|
||||
->default(null)
|
||||
->unique();
|
||||
$table->foreignIdFor(Mod::class)
|
||||
->constrained('mods')
|
||||
->cascadeOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->string('version');
|
||||
$table->longText('description');
|
||||
$table->string('link');
|
||||
$table->foreignIdFor(SptVersion::class)->constrained('spt_versions');
|
||||
$table->foreignIdFor(SptVersion::class)
|
||||
->nullable()
|
||||
->default(null)
|
||||
->constrained('spt_versions')
|
||||
->nullOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->string('virus_total_link');
|
||||
$table->unsignedBigInteger('downloads');
|
||||
$table->boolean('disabled')->default(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user