Skip to content

Commit

Permalink
make xml value column in groups table
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Dec 11, 2024
1 parent 2bcfc1b commit 8d828ac
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Models/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Group extends Model
'name',
'description',
'tagfile',
'xml_value',
];

public function entities()
Expand Down
1 change: 1 addition & 0 deletions app/Traits/DumpFromGit/CreateCategoriesAndGroupsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function createCategoriesAndGroups(): void
'name' => $names[$item],
'description' => $descriptions[$item],
'tagfile' => $item,
'xml_value' => config("groups.$names[$item]"),
]);
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('groups', function (Blueprint $table) {
$table->string('xml_value')->nullable()->after('tagfile');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('groups', function (Blueprint $table) {
$table->dropColumn('xml_value');
});
}
};

0 comments on commit 8d828ac

Please sign in to comment.