Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2021-06-19 16:20:35 -07:00
commit cdcb153b1e

View file

@ -15,9 +15,16 @@ class MoveAccessoryCheckoutNoteToJoinTable extends Migration
*/ */
public function up() public function up()
{ {
Schema::table('accessories_users', function (Blueprint $table) {
$table->string('note')->nullable(true)->default(null); if (!Schema::hasColumn('accessories_users', 'note'))
}); {
Schema::table('accessories_users', function (Blueprint $table) {
$table->string('note')->nullable(true)->default(null);
});
}
// Loop through the checked out accessories, find their related action_log entry, and copy over the note // Loop through the checked out accessories, find their related action_log entry, and copy over the note
// to the newly created note field // to the newly created note field
@ -82,8 +89,15 @@ class MoveAccessoryCheckoutNoteToJoinTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::table('accessories_users', function (Blueprint $table) {
$table->dropColumn('note'); if (Schema::hasColumn('accessories_users', 'note'))
}); {
Schema::table('accessories_users', function (Blueprint $table)
{
$table->dropColumn('note');
});
}
} }
} }