mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
tag and installer&updater use english
This commit is contained in:
@@ -14,7 +14,9 @@ class AddTotalDaysToAttendanceTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('attendance', function (Blueprint $table) {
|
||||
$table->integer('total_days')->default(0);
|
||||
if (!Schema::hasColumn('attendance', 'total_days')) {
|
||||
$table->integer('total_days')->default(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ class AddHrToTorrentsTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('torrents', function (Blueprint $table) {
|
||||
$table->tinyInteger('hr')->default(0);
|
||||
if (!Schema::hasColumn('torrents', 'hr')) {
|
||||
$table->tinyInteger('hr')->default(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ class AddSeedPointsToUsersTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->decimal('seed_points', 20, 1)->default(0);
|
||||
if (!Schema::hasColumn('users', 'seed_points')) {
|
||||
$table->decimal('seed_points', 20, 1)->default(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ class AddIdToAgentAllowedExceptionTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('agent_allowed_exception', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
if (!Schema::hasColumn('agent_allowed_exception', 'id')) {
|
||||
$table->increments('id');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
34
database/migrations/2022_03_07_012545_create_tags_table.php
Normal file
34
database/migrations/2022_03_07_012545_create_tags_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tags', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->unique();
|
||||
$table->string('color');
|
||||
$table->integer('priority')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tags');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrent_tags', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('torrent_id');
|
||||
$table->integer('tag_id')->index();
|
||||
$table->timestamps();
|
||||
$table->unique(['torrent_id', 'tag_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrent_tags');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIconIdToCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('categories', 'icon_id')) {
|
||||
$table->integer('icon_id')->default(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
$table->dropColumn('icon_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddInviteeFieldsToInvitesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasColumn('invites', 'valid')) {
|
||||
return;
|
||||
}
|
||||
Schema::table('invites', function (Blueprint $table) {
|
||||
$table->tinyInteger('valid')->default(1);
|
||||
$table->integer('invitee_register_uid')->nullable();
|
||||
$table->string('invitee_register_email')->nullable();
|
||||
$table->string('invitee_register_username')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('invites', function (Blueprint $table) {
|
||||
$table->dropColumn(['valid', 'invitee_register_uid', 'invitee_register_email', 'invitee_register_username']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddCustomFieldsToSearchboxTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasColumn('searchbox', 'custom_fields')) {
|
||||
return;
|
||||
}
|
||||
Schema::table('searchbox', function (Blueprint $table) {
|
||||
$table->text('custom_fields')->nullable();
|
||||
$table->string('custom_fields_display_name')->nullable();
|
||||
$table->text('custom_fields_display')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('searchbox', function (Blueprint $table) {
|
||||
$table->dropColumn(['custom_fields', 'custom_fields_display_name', 'custom_fields_display']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPtGenTagsTechnicalInfoToTorrentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('torrents', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('torrents', 'pt_gen')) {
|
||||
$table->mediumText('pt_gen')->nullable();
|
||||
}
|
||||
if (!Schema::hasColumn('torrents', 'tags')) {
|
||||
$table->integer('tags')->default(0);
|
||||
}
|
||||
if (!Schema::hasColumn('torrents', 'technical_info')) {
|
||||
$table->text('technical_info')->nullable();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('torrents', function (Blueprint $table) {
|
||||
$table->dropColumn(['pt_gen', 'tags', 'technical_info']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPageToUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('users', 'page')) {
|
||||
$table->string('page')->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('page');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user