Skip to content

Commit

Permalink
Merge pull request #317 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Update SessionLog for Future Update
  • Loading branch information
JoshuaMicallefYBSU authored Aug 19, 2024
2 parents c551979 + 48af86a commit 523f7c8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function schedule(Schedule $schedule)
$schedule->job(new ProcessSessionReminders())->daily();

// Check Training Threads Status (Once per week)
$schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(7, '22:35');
$schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(6, '6:00');

// Discord role updating
//$schedule->job(new UpdateDiscordUserRoles)->twiceDaily(6, 18);
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Network/SessionLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SessionLog extends Model

// session_start and session_end are in format 'Y-m-d H:i:s'
protected $fillable = [
'id', 'roster_member_id', 'cid', 'session_start', 'session_end', 'monitored_position_id', 'duration', 'emails_sent', 'callsign'];
'id', 'roster_member_id', 'cid', 'session_start', 'session_end', 'monitored_position_id', 'duration', 'emails_sent', 'callsign', 'discord_id'];

public function user()
{
Expand Down
32 changes: 32 additions & 0 deletions database/migrations/2024_08_19_152312_update_session_log.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

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

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

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('session_logs', function (Blueprint $table) {
$table->dropColumn(['discord_id']);
});
}
};

0 comments on commit 523f7c8

Please sign in to comment.