linking stuff

This commit is contained in:
Jake Kasper
2025-08-25 08:42:03 -04:00
parent b1dba9e6d7
commit 88996a8f5b
5 changed files with 192 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
-- Link spreader settings to actual user equipment instead of storing text
-- This allows better integration and recommendations
-- Add equipment reference to product_spreader_settings
ALTER TABLE product_spreader_settings
ADD COLUMN IF NOT EXISTS equipment_id INTEGER REFERENCES user_equipment(id) ON DELETE CASCADE;
-- Create index for the new relationship
CREATE INDEX IF NOT EXISTS idx_product_spreader_settings_equipment ON product_spreader_settings(equipment_id);
-- We'll keep the old columns for backward compatibility during transition
-- They can be removed later once all data is migrated
SELECT 'Added equipment reference to spreader settings!' as migration_status;