Add USB checkout system and SSO profile page
New Features: - USB Device checkout/check-in system with barcode scanning - displayusb.asp: List all USB devices with status - addusb.asp: Add new USB devices via barcode scan - checkout_usb.asp/savecheckout_usb.asp: Check out USB to SSO - checkin_usb.asp/savecheckin_usb.asp: Check in with wipe confirmation - usb_history.asp: Full checkout history with filters - api_usb.asp: JSON API for AJAX lookups - displayprofile.asp: SSO profile page showing user info and USB history - Date/time format changed to 12-hour (MM/DD/YYYY h:mm AM/PM) - SSO links in USB history now link to profile page via search Database: - New machinetypeid 44 for USB devices - New usb_checkouts table for tracking checkouts Cleanup: - Removed v2 folder (duplicate/old files) - Removed old debug/test files - Removed completed migration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
75
sql/migration_phase4/RUN_ALL_PHASE4_SCRIPTS.sql
Normal file
75
sql/migration_phase4/RUN_ALL_PHASE4_SCRIPTS.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
-- =====================================================
|
||||
-- RUN ALL PHASE 4 SCRIPTS: Application Versions
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Execute all Phase 4 migration scripts in order
|
||||
--
|
||||
-- USAGE:
|
||||
-- mysql -u root -p shopdb < RUN_ALL_PHASE4_SCRIPTS.sql
|
||||
--
|
||||
-- OR run each script individually:
|
||||
-- 1. 01_create_appversions_table.sql
|
||||
-- 2. 02_add_appversionid_to_installedapps.sql
|
||||
-- 3. 03_add_appid_to_notifications.sql
|
||||
-- 4. VERIFY_PHASE4_MIGRATION.sql
|
||||
--
|
||||
-- ROLLBACK ORDER (if needed):
|
||||
-- 1. ROLLBACK_03_notifications_appid.sql
|
||||
-- 2. ROLLBACK_02_installedapps_appversionid.sql
|
||||
-- 3. ROLLBACK_01_appversions_table.sql
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 MIGRATION: Application Versions' AS '';
|
||||
SELECT 'Started at: ' AS '', NOW() AS timestamp;
|
||||
SELECT '=================================================' AS '';
|
||||
|
||||
-- =====================================================
|
||||
-- PRE-MIGRATION BACKUP REMINDER
|
||||
-- =====================================================
|
||||
SELECT 'REMINDER: Ensure you have a database backup before proceeding!' AS '';
|
||||
SELECT '' AS '';
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 1: Create appversions table
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 01: Create appversions table ---' AS '';
|
||||
|
||||
SOURCE 01_create_appversions_table.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 2: Add appversionid to installedapps
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 02: Add appversionid to installedapps ---' AS '';
|
||||
|
||||
SOURCE 02_add_appversionid_to_installedapps.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 3: Add appid to notifications
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 03: Add appid to notifications ---' AS '';
|
||||
|
||||
SOURCE 03_add_appid_to_notifications.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- VERIFICATION
|
||||
-- =====================================================
|
||||
SELECT '--- Running Verification ---' AS '';
|
||||
|
||||
SOURCE VERIFY_PHASE4_MIGRATION.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- COMPLETE
|
||||
-- =====================================================
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 MIGRATION COMPLETE' AS '';
|
||||
SELECT 'Finished at: ' AS '', NOW() AS timestamp;
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT '' AS '';
|
||||
SELECT 'NEXT STEPS:' AS '';
|
||||
SELECT '1. Update api.asp to use appversions table' AS '';
|
||||
SELECT '2. Update PowerShell script to send version data' AS '';
|
||||
SELECT '3. Update notification forms to allow app selection' AS '';
|
||||
SELECT '=================================================' AS '';
|
||||
Reference in New Issue
Block a user