Add table-check; add command-description for Artisan command

This commit is contained in:
Brady Wetherington 2024-01-25 20:07:18 +00:00
parent 81b8243e1d
commit b39b575fec
2 changed files with 9 additions and 7 deletions

View file

@ -19,7 +19,7 @@ class SamlClearExpiredNonces extends Command
*
* @var string
*/
protected $description = 'Command description';
protected $description = 'Clears out expired SAML assertions from the saml_nonces table';
/**
* Create a new command instance.

View file

@ -13,12 +13,14 @@ class CreateSamlNonceTable extends Migration
*/
public function up()
{
Schema::create('saml_nonces', function (Blueprint $table) {
$table->id();
$table->string('nonce')->index();
$table->datetime('not_valid_after')->index();
//$table->timestamps();
});
if (! Schema::hasTable('saml_nonces') ) {
Schema::create('saml_nonces', function (Blueprint $table) {
$table->id();
$table->string('nonce')->index();
$table->datetime('not_valid_after')->index();
//$table->timestamps();
});
}
}
/**