Files
rspade_system/app/RSpade/Commands/Restricted/Notification_Table_Command.php
root 29c657f7a7 Exclude tests directory from framework publish
Add 100+ automated unit tests from .expect file specifications
Add session system test
Add rsx:constants:regenerate command test
Add rsx:logrotate command test
Add rsx:clean command test
Add rsx:manifest:stats command test
Add model enum system test
Add model mass assignment prevention test
Add rsx:check command test
Add migrate:status command test

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 03:59:58 +00:00

58 lines
1.9 KiB
PHP

<?php
namespace App\RSpade\Commands\Restricted;
use App\RSpade\Commands\Restricted\Restricted_Database_Command;
/**
* Restricted version of notifications:table command
*
* This command is disabled in the RSpade framework because:
* - Database structure is managed through migrations
* - Tables should be created via forward-only migrations
* - Prevents scaffold commands from altering database structure
*/
class Notification_Table_Command extends Restricted_Database_Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'notifications:table';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This command has been restricted in RSX';
/**
* Get the specific reason this command is restricted
*
* @return string
*/
protected function get_restricted_reason(): string
{
return "The notifications:table command creates database tables outside of the migration system.\n\n" .
"In the RSpade framework, all database tables must be created through migrations.\n" .
"If you need a notifications table, create a migration:\n" .
" php artisan make:migration:safe create_notifications_table\n\n" .
"Then define the table structure in the migration file.";
}
/**
* Get the alternative approach message
*
* @return string
*/
protected function get_alternative_approach(): string
{
return "To add notification support:\n" .
"1. Create a migration: php artisan make:migration:safe create_notifications_table\n" .
"2. Define the notifications table structure in the migration\n" .
"3. Run migrations: php artisan migrate\n\n" .
"This ensures your database structure is version-controlled and reproducible.";
}
}