mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
fix migration file error
This commit is contained in:
@@ -21,12 +21,13 @@ class CreatePostsTable extends Migration
|
||||
$table->unsignedMediumInteger('topicid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
$table->text('body')->nullable()->index('body');
|
||||
$table->text('body')->nullable();
|
||||
$table->text('ori_body')->nullable();
|
||||
$table->unsignedMediumInteger('editedby')->default(0);
|
||||
$table->dateTime('editdate')->nullable();
|
||||
$table->index(['topicid', 'id'], 'topicid_id');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement('alter table posts add fulltext body(body)');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,10 +20,11 @@ class CreateTorrentsCustomFieldValuesTable extends Migration
|
||||
$table->integer('id', true);
|
||||
$table->integer('torrent_id')->default(0)->index('idx_torrent_id');
|
||||
$table->integer('custom_field_id')->default(0)->index('idx_field_id');
|
||||
$table->mediumText('custom_field_value')->nullable()->index('idx_field_value');
|
||||
$table->mediumText('custom_field_value')->nullable();
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement('alter table torrents_custom_field_values add index(custom_field_value(191))');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,6 @@ class CreateTorrentsTable extends Migration
|
||||
}
|
||||
Schema::create('torrents', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->binary('info_hash')->unique('info_hash');
|
||||
$table->string('name')->default('')->index('name');
|
||||
$table->string('filename')->default('');
|
||||
$table->string('save_as')->default('');
|
||||
@@ -65,6 +64,8 @@ class CreateTorrentsTable extends Migration
|
||||
$table->index(['category', 'visible', 'banned'], 'category_visible_banned');
|
||||
$table->index(['visible', 'banned', 'pos_state', 'id'], 'visible_banned_pos_id');
|
||||
});
|
||||
$sql = 'alter table torrents add column `info_hash` binary(20) NOT NULL after id, add unique info_hash(`info_hash`)';
|
||||
\Illuminate\Support\Facades\DB::statement($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user