Skip to content

Commit

Permalink
Merge pull request #1152 from gyakkun/fix_migrate
Browse files Browse the repository at this point in the history
fix: 'down()' in some migration scripts.
  • Loading branch information
HDVinnie authored Feb 16, 2020
2 parents 54328ae + bb53208 commit 947f260
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion database/migrations/2018_05_18_144651_rename_ban_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public function up()
*/
public function down()
{
Schema::rename('ban', 'bans');
Schema::rename('bans', 'ban');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function up()
public function down()
{
Schema::table('peers', function ($table) {
$table->renameColumn('hash', 'info_hash');
$table->renameColumn('info_hash', 'hash');
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function up()
public function down()
{
Schema::table('private_messages', function ($table) {
$table->renameColumn('reciever_id', 'receiver_id');
$table->renameColumn('receiver_id', 'reciever_id');
});
}
}
1 change: 1 addition & 0 deletions database/migrations/2019_01_11_001150_alter_rss_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function down()
$table->integer('userID')->index('userID');
$table->string('category')->nullable();
$table->timestamps();
$table->foreign('userID', 'rss_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function up()
public function down()
{
Schema::table('bot_transactions', function (Blueprint $table) {
//
$table->dropIfExists('bot_transactions');
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function up()
public function down()
{
Schema::table('torrents', function (Blueprint $table) {
$table->year('release_year')->nullable()->index();
$table->dropColumn('release_year');
});
}
}
10 changes: 10 additions & 0 deletions database/migrations/2019_11_05_233558_create_audits_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,15 @@ public function up()
public function down()
{
Schema::dropIfExists('audits');
Schema::create('log_activities', function (Blueprint $table) {
$table->increments('id');
$table->string('subject');
$table->string('url');
$table->string('method');
$table->string('ip');
$table->string('agent')->nullable();
$table->integer('user_id')->nullable();
$table->timestamps();
});
}
}

0 comments on commit 947f260

Please sign in to comment.