From: Daniel Karbach Date: Wed, 27 Apr 2022 13:59:48 +0000 (+0200) Subject: record discord channel parent X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=ad0afcf40cb97feadc6300d2c19add8363adb341;hp=3caf693c776de3293ec3cb86e19ddebdf9891368;p=alttp.git record discord channel parent --- diff --git a/app/Models/DiscordChannel.php b/app/Models/DiscordChannel.php index ba3d317..ab699a7 100644 --- a/app/Models/DiscordChannel.php +++ b/app/Models/DiscordChannel.php @@ -38,6 +38,7 @@ class DiscordChannel extends Model $model->type = $channel->type; $model->position = $channel->position; $model->private = $channel->is_private; + $model->parent_id = $channel->parent_id; $model->save(); } diff --git a/database/migrations/2022_04_27_135554_add_channel_parent.php b/database/migrations/2022_04_27_135554_add_channel_parent.php new file mode 100644 index 0000000..2bf99f0 --- /dev/null +++ b/database/migrations/2022_04_27_135554_add_channel_parent.php @@ -0,0 +1,32 @@ +string('parent_id')->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('discord_channels', function(Blueprint $table) { + $table->dropColumn('parent_id'); + }); + } +};