🔧 Database Migration Tool

Procurement System - Database Schema Update

Connected to database successfully

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
🔄Starting database migration...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋Updating users table...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋Updating departments table...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋Updating budget_categories table...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋Updating vendors_main table...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋 Updating procurement_requests table... 📋 Updating request_items table... 📋 Creating approval_queue table... 📋 Creating approval_actions table... 📋 Creating workflow_rules table... 📋 Creating user_notification_preferences table... 📋 Creating approval_delegations table... 📋 Creating approval_notifications table... 📋 Creating workflow_instances table... 📋 Creating in_app_notifications table... 📋 Creating approval_analytics table... 📋 Creating audit_logs table...
📊Inserting sample data...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋Inserting departments...

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Information Technology

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Human Resources

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Finance

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Operations

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Sales & Marketing

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
Inserted/Updated department: Administration

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📋 Inserting budget categories... ✓ Inserted/Updated category: IT Equipment ✓ Inserted/Updated category: Office Supplies ✓ Inserted/Updated category: Furniture & Fixtures ✓ Inserted/Updated category: Professional Services ✓ Inserted/Updated category: Maintenance & Repairs ✓ Inserted/Updated category: Training & Development ✓ Inserted/Updated category: Travel & Entertainment 📋 Inserting vendors... ✓ Inserted/Updated vendor: Dell Technologies Nigeria ✓ Inserted/Updated vendor: HP Nigeria ✓ Inserted/Updated vendor: Office Mart Limited ✓ Inserted/Updated vendor: TechFix Solutions ✓ Inserted/Updated vendor: Furniture Palace 📋 Inserting sample users... ✓ Inserted/Updated user: System Administrator ✓ Inserted/Updated user: John Department Head ✓ Inserted/Updated user: Jane Finance Manager ✓ Inserted/Updated user: Mike Procurement Manager ✓ Inserted/Updated user: Sarah Managing Director 📋 Inserting workflow rules... ✓ Inserted/Updated workflow rule: Micro Purchases ✓ Inserted/Updated workflow rule: Small Purchases ✓ Inserted/Updated workflow rule: Medium Purchases ✓ Inserted/Updated workflow rule: Large Purchases ✓ Inserted/Updated workflow rule: Major Purchases ✓ Inserted/Updated workflow rule: Capital Expenditure 📋 Inserting notification preferences... ⚠ Warning: Could not insert notification preferences: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'field list' 🔧 Creating stored procedures... ✓ Created AddToApprovalQueue procedure ✓ Created RecordApprovalAction procedure ⚡ Creating triggers... ⚠ Warning: Could not create trigger: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'department_id' in 'NEW'
Migration completed successfully!

Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /home/irtqnoel/procurement-system.richmoreconsult.com/database/db_migration_script.php on line 59
📊 Migration Summary: ================== 📈 Database Statistics: ====================== Users : 15 records Departments : 10 records Budget Categories : 32 records Vendors Main : 74 records Procurement Requests : 6 records Request Items : 9 records Approval Queue : 6 records Approval Actions : 0 records Workflow Rules : 30 records User Notification Preferences : 0 records 🎉 Your procurement system database is now ready! 📝 Default admin login: admin@company.com / admin123 📝 Sample users created with password: password123