Appearance
Deleting Module Features
This guide explains safe practices for deleting features, custom fields, and module components, including data backup, impact assessment, and cleanup procedures.
Table of Contents
- Overview
- Safe Deletion Practices
- Data Backup Before Deletion
- Removing Custom Fields
- Cleaning Up Related Data
- Impact Assessment
- Best Practices
Overview
What Can Be Deleted
- ✅ Custom fields
- ✅ Module content
- ✅ Unused features
- ✅ Temporary data
- ✅ Test data
What Cannot Be Deleted
- ❌ Core system fields
- ❌ Required relationships
- ❌ Critical data
- ❌ Active content
Important Warnings
⚠️ Deletion is Permanent:
- Deleted data cannot be recovered
- Always backup before deletion
- Test in development first
- Verify impact before deleting
Safe Deletion Practices
Pre-Deletion Checklist
Before Deleting Anything
Backup Data:
- ✅ Full database backup
- ✅ File backups
- ✅ Configuration backups
Assess Impact:
- ✅ Identify dependencies
- ✅ Check relationships
- ✅ Review usage
Test in Development:
- ✅ Test deletion process
- ✅ Verify no errors
- ✅ Check functionality
Document:
- ✅ Document what's being deleted
- ✅ Note reasons
- ✅ Record date/time
Deletion Process
Step-by-Step Process
Identify What to Delete:
- Determine what needs deletion
- Verify it's safe to delete
- Check for dependencies
Backup:
- Create full backup
- Verify backup integrity
- Store backup safely
Test:
- Test in development
- Verify deletion works
- Check for errors
Delete:
- Perform deletion
- Verify completion
- Check for errors
Verify:
- Verify deletion successful
- Check related functionality
- Monitor for issues
Data Backup Before Deletion
Database Backup
Full Backup
Methods:
- cPanel: Use phpMyAdmin export
- Command Line: Use mysqldump
- Backup Tools: Use backup scripts
Command Example:
bash
mysqldump -u username -p database_name > backup.sqlSelective Backup
Backup Specific Tables:
- Custom fields table
- Custom field values
- Related data tables
File Backup
Backup Files
What to Backup:
- Configuration files
- Custom templates
- Uploaded files
- Custom code
Methods:
- FTP: Download via FTP
- SSH: Use scp or rsync
- cPanel: Use File Manager
Backup Verification
Verify Backup
Check Backup File:
- Verify file exists
- Check file size
- Verify integrity
Test Restore:
- Test restore process
- Verify data integrity
- Check functionality
Removing Custom Fields
Deleting Custom Fields
Step 1: Access Custom Fields
- Navigate to Custom Fields:
- Go to module
- Click Custom Fields
- Find field to delete
Step 2: Review Field
Check Usage:
- Check if field is used
- Review field values
- Identify dependencies
Assess Impact:
- What data will be lost
- What features affected
- What needs updating
Step 3: Backup
- Export Field Data:
- Export field values
- Save to file
- Store safely
Step 4: Delete Field
Click Delete:
- Click Delete button
- Confirm deletion
- Field deleted
Verify:
- Field removed from list
- Forms updated
- No errors
Field Value Cleanup
After Field Deletion
Check Values:
- Field values may remain
- May need manual cleanup
- Check database
Clean Up:
- Remove orphaned values
- Clean database
- Verify cleanup
Cleaning Up Related Data
Related Data Types
Foreign Key Relationships
What to Check:
- Related records
- Foreign key constraints
- Dependent data
Cleanup:
- Delete related records first
- Or set to null
- Or reassign
Polymorphic Relationships
What to Check:
- Polymorphic associations
- Related models
- Dependent data
Cleanup:
- Remove associations
- Clean up references
- Verify cleanup
Data Cleanup Process
Step 1: Identify Related Data
- Find Dependencies:
- Check relationships
- Review foreign keys
- Identify related records
Step 2: Clean Up
- Delete Related Data:
- Delete dependent records
- Remove associations
- Clean references
Step 3: Verify
- Check Cleanup:
- Verify data removed
- Check for orphans
- Verify integrity
Impact Assessment
Before Deletion
Assess Impact
Identify Dependencies:
- What depends on this
- What uses this
- What references this
Check Usage:
- Where is it used
- How is it used
- Who uses it
Evaluate Impact:
- High/Medium/Low impact
- Critical/Non-critical
- Reversible/Irreversible
Impact Categories
High Impact
Characteristics:
- Used in multiple places
- Critical functionality
- Active data
- Many dependencies
Action:
- Extra caution required
- Extensive testing
- Detailed backup
- Staged deletion
Medium Impact
Characteristics:
- Limited usage
- Some dependencies
- Moderate importance
Action:
- Standard precautions
- Normal testing
- Standard backup
Low Impact
Characteristics:
- Minimal usage
- Few dependencies
- Low importance
Action:
- Basic precautions
- Quick testing
- Basic backup
Best Practices
Before Deletion
Always Backup:
- Full backup required
- Verify backup works
- Store safely
Test First:
- Test in development
- Verify process
- Check for errors
Document:
- Document what's deleted
- Note reasons
- Record date/time
During Deletion
Be Careful:
- Double-check selection
- Verify correct item
- Confirm before deleting
Monitor:
- Watch for errors
- Check logs
- Monitor system
Verify:
- Verify deletion complete
- Check related items
- Verify no errors
After Deletion
Verify Functionality:
- Test all features
- Check for errors
- Verify data integrity
Clean Up:
- Remove orphaned data
- Clean database
- Update references
Update Documentation:
- Update documentation
- Note deletions
- Update guides
Troubleshooting
Deletion Failed
Solutions:
- Check permissions
- Verify item exists
- Check dependencies
- Review error messages
- Try again
Data Still Exists
Solutions:
- Check database directly
- Verify deletion completed
- Clear cache
- Check for soft deletes
- Manual cleanup if needed
Related Errors
Solutions:
- Check relationships
- Verify foreign keys
- Clean up references
- Restore from backup if needed
- Fix errors
Related Documentation
Last Updated: [Date will be updated during final review]