mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
cdcb153b1e
|
@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue