mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
feat(cleanup): add command for sanitizing name fields across models
- Introduced `CleanupNames` command to sanitize name fields by removing invalid characters, ensuring only letters, numbers, spaces, dashes, underscores, and dots are retained. - Implemented options for dry run, model-specific cleaning, database backup, and forced execution. - Updated `Init` command to call the new `cleanup:names` command. - Enhanced project and environment validation to enforce name sanitization rules. - Added `HasSafeNameAttribute` trait to relevant models for consistent name handling.
This commit is contained in:
1 parent
6727fd958f
commit
e958b3761d
28 files changed
+364
-26
No files matched your search
@@ -53,6 +53,11 @@ class Init extends Command
|
||||
|
||||
$this->call('cleanup:redis');
|
||||
|
||||
try {
|
||||
$this->call('cleanup:names');
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error in cleanup:names command: {$e->getMessage()}\n";
|
||||
}
|
||||
$this->call('cleanup:stucked-resources');
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user