mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
migrations check if table exists
This commit is contained in:
@@ -13,6 +13,9 @@ class CreatePersonalAccessTokensTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('personal_access_tokens')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->morphs('tokenable');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAdclicksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('adclicks')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('adclicks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('adid')->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAdminpanelTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('adminpanel')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('adminpanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAdvertisementsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('advertisements')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('advertisements', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->boolean('enabled')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAgentAllowedExceptionTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('agent_allowed_exception')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('agent_allowed_exception', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('family_id')->default(0)->index('family_id');
|
||||
$table->string('name', 100)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAgentAllowedFamilyTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('agent_allowed_family')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('agent_allowed_family', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('family', 50)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAllowedemailsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('allowedemails')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('allowedemails', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->mediumText('value');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAttachmentsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('attachments')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('attachments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAttendanceTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('attendance')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('attendance', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedInteger('uid')->default(0)->index('idx_uid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAudiocodecsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('audiocodecs')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('audiocodecs', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateAvpsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('avps')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('avps', function (Blueprint $table) {
|
||||
$table->string('arg', 20)->default('')->primary();
|
||||
$table->text('value_s');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateBannedemailsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('bannedemails')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('bannedemails', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->mediumText('value');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateBansTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('bans')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('bans', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateBitbucketTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('bitbucket')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('bitbucket', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('owner')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateBlocksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('blocks')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('blocks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateBookmarksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('bookmarks')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('bookmarks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCategoriesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('categories')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('categories', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedTinyInteger('mode')->default(1);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCaticonsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('caticons')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('caticons', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 64)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCheatersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('cheaters')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('cheaters', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateChronicleTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('chronicle')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('chronicle', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCodecsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('codecs')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('codecs', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCommentsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('comments')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('comments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('user')->default(0)->index('user');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateCountriesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('countries')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 50)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateDownloadspeedTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('downloadspeed')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('downloadspeed', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateExamProgressTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('exam_progress')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('exam_progress', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('exam_user_id')->index();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateExamUsersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('exam_users')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('exam_users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('uid')->index();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateExamsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('exams')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('exams', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFailedJobsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('failed_jobs')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('uuid')->unique();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFaqTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('faq')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('faq', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('link_id')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFilesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('files')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent')->default(0)->index('torrent');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateForummodsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('forummods')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('forummods', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('forumid')->default(0)->index('forumid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateForumsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('forums')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('forums', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('sort')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFriendsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('friends')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('friends', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFunTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('fun')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('fun', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFundsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('funds')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('funds', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->decimal('usd')->default(0.00);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateFunvotesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('funvotes')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('funvotes', function (Blueprint $table) {
|
||||
$table->unsignedMediumInteger('funid');
|
||||
$table->unsignedMediumInteger('userid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateInvitesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('invites')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('invites', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('inviter')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateIplogTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('iplog')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('iplog', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('ip', 64)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateIspTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('isp')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('isp', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateLanguageTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('language')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('language', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('lang_name', 50)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateLinksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('links')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('links', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateLocationsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('locations')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('locations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateLoginattemptsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('loginattempts')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('loginattempts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('ip', 64)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateMagicTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('magic')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('magic', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('torrentid')->default(0)->index('idx_torrentid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateMediaTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('media')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('media', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateMessagesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('messages')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('messages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('sender')->default(0)->index('sender');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateModpanelTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('modpanel')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('modpanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateNewsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('news')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('news', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateOffersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('offers')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('offers', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateOffervotesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('offervotes')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('offervotes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('offerid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateOverforumsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('overforums')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('overforums', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 60)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreatePeersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('peers')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('peers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent')->default(0)->index('torrent');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreatePmboxesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('pmboxes')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('pmboxes', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreatePollanswersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('pollanswers')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('pollanswers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('pollid')->default(0)->index('pollid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreatePollsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('polls')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('polls', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreatePostsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('posts')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('posts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('topicid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateProcessingsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('processings')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('processings', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateProlinkclicksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('prolinkclicks')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('prolinkclicks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateReadpostsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('readposts')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('readposts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateRegimagesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('regimages')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('regimages', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->string('imagehash', 32)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateReportsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('reports')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('reports', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('addedby')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateRequestsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('requests')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('requests', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('userid')->default(0)->index('userid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateResreqTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('resreq')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('resreq', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('reqid')->default(0)->index('reqid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateRulesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('rules')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('rules', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('lang_id')->default(6);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSchoolsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('schools')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('schools', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSearchboxFieldsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('searchbox_fields')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('searchbox_fields', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('searchbox_id');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSearchboxTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('searchbox')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('searchbox', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 30)->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSecondiconsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('secondicons')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('secondicons', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedTinyInteger('source')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSettingsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('settings')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name')->default('')->unique('uniqe_name');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateShoutboxTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('shoutbox')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('shoutbox', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSitelogTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('sitelog')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('sitelog', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSnatchedTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('snatched')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('snatched', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSourcesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('sources')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('sources', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateStaffmessagesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('staffmessages')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('staffmessages', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('sender')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateStandardsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('standards')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('standards', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateStylesheetsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('stylesheets')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('stylesheets', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('uri')->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSubsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('subs')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('subs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent_id')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSuggestTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('suggest')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('suggest', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('keywords')->default('')->index('keywords');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateSysoppanelTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('sysoppanel')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('sysoppanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTeamsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('teams')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('teams', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateThanksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('thanks')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('thanks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTopicsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('topics')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('topics', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTorrentSecretsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('torrent_secrets')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('torrent_secrets', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uid')->index('idx_uid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTorrentsCustomFieldValuesTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('torrents_custom_field_values')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('torrents_custom_field_values', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('torrent_id')->default(0)->index('idx_torrent_id');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTorrentsCustomFieldsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('torrents_custom_fields')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('torrents_custom_fields', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name')->default('');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTorrentsStateTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('torrents_state')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('torrents_state', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('global_sp_state')->default(1);
|
||||
});
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateTorrentsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('torrents')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('torrents', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->binary('info_hash')->unique('info_hash');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateUploadspeedTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('uploadspeed')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('uploadspeed', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateUserBanLogsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('user_ban_logs')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('user_ban_logs', function (Blueprint $table) {
|
||||
$table->bigInteger('id', true);
|
||||
$table->integer('uid')->default(0)->index('idx_uid');
|
||||
|
||||
@@ -13,6 +13,9 @@ class CreateUsersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('users')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('username', 40)->default('')->unique('username');
|
||||
|
||||
Reference in New Issue
Block a user