diff --git a/database/migrations/024_fix_colors_cleanup.sql b/database/migrations/024_fix_colors_cleanup.sql new file mode 100644 index 0000000..86ee007 --- /dev/null +++ b/database/migrations/024_fix_colors_cleanup.sql @@ -0,0 +1,205 @@ +-- Migration 024: Fix colors cleanup (handles partial state from 023) +-- Source of truth: bambu_lab_filaments.numbers spreadsheet + +-- Delete the typo duplicate (keep the correct one) +DELETE FROM colors WHERE name = 'IronGray Metallic'; + +-- Delete fake colors not used by any filament +DELETE FROM colors WHERE name IN ( + 'Coton Candy Cloud', + 'Glow in the Dark Blue', + 'Glow in the Dark Green', + 'Grey', + 'Indingo Purple', + 'Ivory', + 'Ivory White', + 'Light Blue', + 'Light Green', + 'Matte Black', + 'Matte Blue', + 'Matte Brown', + 'Matte Coral', + 'Matte Green', + 'Matte Grey', + 'Matte Lime', + 'Matte Mint', + 'Matte Navy', + 'Matte Orange', + 'Matte Pink', + 'Matte Purple', + 'Matte White', + 'Matte Yellow', + 'Metal Bronze', + 'Metal Copper', + 'Metal Gold', + 'Metal Grey', + 'Metal Silver', + 'Mint Green', + 'Natural', + 'Navy Blue', + 'Nebulane', + 'Silk Black', + 'Silk Blue', + 'Silk Bronze', + 'Silk Copper', + 'Silk Emerald', + 'Silk Gold', + 'Silk Green', + 'Silk Jade', + 'Silk Orange', + 'Silk Pearl', + 'Silk Pink', + 'Silk Purple', + 'Silk Red', + 'Silk Rose Gold', + 'Silk Ruby', + 'Silk Sapphire', + 'Silk Silver', + 'Silk White', + 'Sky Blue', + 'Sparkle Blue', + 'Sparkle Gold', + 'Sparkle Green', + 'Sparkle Purple', + 'Sparkle Red', + 'Sparkle Silver', + 'Support G', + 'Support White', + 'Translucent Tea', + 'Transparent Blue', + 'Transparent Green', + 'Transparent Orange', + 'Transparent Purple', + 'Transparent Red', + 'Transparent Yellow', + 'Violet' +); + +-- Fix all hex codes to match spreadsheet +UPDATE colors SET hex = '#3B7DD8' WHERE name = 'ABS Azure'; +UPDATE colors SET hex = '#00AE42' WHERE name = 'ABS Bambu Green'; +UPDATE colors SET hex = '#1A1A1A' WHERE name = 'ABS Black'; +UPDATE colors SET hex = '#1A3C8F' WHERE name = 'ABS Blue'; +UPDATE colors SET hex = '#1B2A4A' WHERE name = 'ABS Navy Blue'; +UPDATE colors SET hex = '#6B7339' WHERE name = 'ABS Olive'; +UPDATE colors SET hex = '#F57C20' WHERE name = 'ABS Orange'; +UPDATE colors SET hex = '#C0392B' WHERE name = 'ABS Red'; +UPDATE colors SET hex = '#B0B0B0' WHERE name = 'ABS Silver'; +UPDATE colors SET hex = '#FFBF00' WHERE name = 'ABS Tangerine Yellow'; +UPDATE colors SET hex = '#2E7D32' WHERE name = 'Alpine Green Sparkle'; +UPDATE colors SET hex = '#E0EFF6' WHERE name = 'Arctic Whisper'; +UPDATE colors SET hex = '#9C27B0' WHERE name = 'Aurora Purple'; +UPDATE colors SET hex = '#00AE42' WHERE name = 'Bambu Green'; +UPDATE colors SET hex = '#1A1A1A' WHERE name = 'Black'; +UPDATE colors SET hex = '#3E2723' WHERE name = 'Black Walnut'; +UPDATE colors SET hex = '#FF5722' WHERE name = 'Blaze'; +UPDATE colors SET hex = '#7B8E97' WHERE name = 'Blue Grey'; +UPDATE colors SET hex = '#00C5CD' WHERE name = 'Blue Hawaii'; +UPDATE colors SET hex = '#7C4DFF' WHERE name = 'Blueberry Bubblegum'; +UPDATE colors SET hex = '#9F332A' WHERE name = 'Brick Red'; +UPDATE colors SET hex = '#5EC323' WHERE name = 'Bright Green'; +UPDATE colors SET hex = '#66CDAA' WHERE name = 'Candy Green'; +UPDATE colors SET hex = '#E8505B' WHERE name = 'Candy Red'; +UPDATE colors SET hex = '#F7E7CE' WHERE name = 'Champagne'; +UPDATE colors SET hex = '#DE3163' WHERE name = 'Cherry Pink'; +UPDATE colors SET hex = '#D7C49E' WHERE name = 'Classic Birch'; +UPDATE colors SET hex = '#CFB53B' WHERE name = 'Classic Gold Sparkle'; +UPDATE colors SET hex = '#B08968' WHERE name = 'Clay Brown'; +UPDATE colors SET hex = '#F0F0F0' WHERE name = 'Clear'; +UPDATE colors SET hex = '#2C2C2C' WHERE name = 'Clear Black'; +UPDATE colors SET hex = '#0047AB' WHERE name = 'Cobalt Blue'; +UPDATE colors SET hex = '#0047AB' WHERE name = 'Cobalt Blue Metallic'; +UPDATE colors SET hex = '#6B4332' WHERE name = 'Cocoa Brown'; +UPDATE colors SET hex = '#B87333' WHERE name = 'Copper Brown Metallic'; +UPDATE colors SET hex = '#F8BBD0' WHERE name = 'Cotton Candy Cloud'; +UPDATE colors SET hex = '#F5E6C8' WHERE name = 'Cream'; +UPDATE colors SET hex = '#B71C1C' WHERE name = 'Crimson Red Sparkle'; +UPDATE colors SET hex = '#68B8E8' WHERE name = 'Crystal Blue'; +UPDATE colors SET hex = '#515151' WHERE name = 'Dark Gray'; +UPDATE colors SET hex = '#FFDAB9' WHERE name = 'Dawn Radiance'; +UPDATE colors SET hex = '#FF7043' WHERE name = 'Dusk Glare'; +UPDATE colors SET hex = '#FFCCB0' WHERE name = 'Flesh'; +UPDATE colors SET hex = '#39541A' WHERE name = 'Forest Green'; +UPDATE colors SET hex = '#E0F7FA' WHERE name = 'Frozen'; +UPDATE colors SET hex = '#B76E79' WHERE name = 'Gilded Rose'; +UPDATE colors SET hex = '#5DADE2' WHERE name = 'Glow Blue'; +UPDATE colors SET hex = '#82E0AA' WHERE name = 'Glow Green'; +UPDATE colors SET hex = '#FFB347' WHERE name = 'Glow Orange'; +UPDATE colors SET hex = '#FF69B4' WHERE name = 'Glow Pink'; +UPDATE colors SET hex = '#FFEB3B' WHERE name = 'Glow Yellow'; +UPDATE colors SET hex = '#6A0DAD' WHERE name = 'Grape Jelly'; +UPDATE colors SET hex = '#00AE42' WHERE name = 'Green'; +UPDATE colors SET hex = '#FF4F81' WHERE name = 'Hot Pink'; +UPDATE colors SET hex = '#A5DEE4' WHERE name = 'Ice Blue'; +UPDATE colors SET hex = '#324585' WHERE name = 'Indigo Blue'; +UPDATE colors SET hex = '#3B2D6B' WHERE name = 'Indigo Purple'; +UPDATE colors SET hex = '#C5A04D' WHERE name = 'Iridium Gold Metallic'; +UPDATE colors SET hex = '#5B3A8C' WHERE name = 'Iris Purple'; +UPDATE colors SET hex = '#6E6E6E' WHERE name = 'Iron Gray Metallic'; +UPDATE colors SET hex = '#4A6FA5' WHERE name = 'Jeans Blue'; +UPDATE colors SET hex = '#1F79E5' WHERE name = 'Lake Blue'; +UPDATE colors SET hex = '#5B5B5B' WHERE name = 'Lava Gray'; +UPDATE colors SET hex = '#B39DDB' WHERE name = 'Lavender'; +UPDATE colors SET hex = '#B2EBF2' WHERE name = 'Light Cyan'; +UPDATE colors SET hex = '#C8C8C8' WHERE name = 'Light Gray'; +UPDATE colors SET hex = '#C8E6C9' WHERE name = 'Light Jade'; +UPDATE colors SET hex = '#76FF03' WHERE name = 'Lime'; +UPDATE colors SET hex = '#7EC845' WHERE name = 'Lime Green'; +UPDATE colors SET hex = '#0BDA51' WHERE name = 'Malachite Green'; +UPDATE colors SET hex = '#7B2D34' WHERE name = 'Maroon Red'; +UPDATE colors SET hex = '#7B9B5B' WHERE name = 'Matcha Green'; +UPDATE colors SET hex = '#8DB600' WHERE name = 'Matte Apple Green'; +UPDATE colors SET hex = '#CBC6B8' WHERE name = 'Matte Bone White'; +UPDATE colors SET hex = '#AE835B' WHERE name = 'Matte Caramel'; +UPDATE colors SET hex = '#3C3C3C' WHERE name = 'Matte Charcoal'; +UPDATE colors SET hex = '#1B3A5C' WHERE name = 'Matte Dark Blue'; +UPDATE colors SET hex = '#4D3324' WHERE name = 'Matte Dark Chocolate'; +UPDATE colors SET hex = '#8B1A1A' WHERE name = 'Matte Dark Red'; +UPDATE colors SET hex = '#61C680' WHERE name = 'Matte Grass Green'; +UPDATE colors SET hex = '#FFFFFF' WHERE name = 'Matte Ivory White'; +UPDATE colors SET hex = '#6E6E6E' WHERE name = 'Matte Nardo Gray'; +UPDATE colors SET hex = '#7D3F6B' WHERE name = 'Matte Plum'; +UPDATE colors SET hex = '#7EB6D9' WHERE name = 'Matte Sky Blue'; +UPDATE colors SET hex = '#B15533' WHERE name = 'Matte Terracotta'; +UPDATE colors SET hex = '#F8E875' WHERE name = 'Mellow Yellow'; +UPDATE colors SET hex = '#2C1654' WHERE name = 'Midnight Blaze'; +UPDATE colors SET hex = '#98FFB0' WHERE name = 'Mint'; +UPDATE colors SET hex = '#A5D6A7' WHERE name = 'Mint Lime'; +UPDATE colors SET hex = '#E040FB' WHERE name = 'Mystic Magenta'; +UPDATE colors SET hex = '#4A148C' WHERE name = 'Nebulae'; +UPDATE colors SET hex = '#39FF14' WHERE name = 'Neon City'; +UPDATE colors SET hex = '#76FF03' WHERE name = 'Neon Green'; +UPDATE colors SET hex = '#FF6D00' WHERE name = 'Neon Orange'; +UPDATE colors SET hex = '#4DB6AC' WHERE name = 'Ocean to Meadow'; +UPDATE colors SET hex = '#CC7722' WHERE name = 'Ochre Yellow'; +UPDATE colors SET hex = '#1A1A1A' WHERE name = 'Onyx Black Sparkle'; +UPDATE colors SET hex = '#4A6741' WHERE name = 'Oxide Green Metallic'; +UPDATE colors SET hex = '#A0724A' WHERE name = 'Peanut Brown'; +UPDATE colors SET hex = '#1A237E' WHERE name = 'Phantom Blue'; +UPDATE colors SET hex = '#FF8A65' WHERE name = 'Pink Citrus'; +UPDATE colors SET hex = '#E87530' WHERE name = 'Pumpkin Orange'; +UPDATE colors SET hex = '#A6A6A6' WHERE name = 'Quicksilver'; +UPDATE colors SET hex = '#A0522D' WHERE name = 'Red Granite'; +UPDATE colors SET hex = '#B76E79' WHERE name = 'Rose Gold'; +UPDATE colors SET hex = '#65000B' WHERE name = 'Rosewood'; +UPDATE colors SET hex = '#002FA7' WHERE name = 'Royal Blue'; +UPDATE colors SET hex = '#6A1B9A' WHERE name = 'Royal Purple Sparkle'; +UPDATE colors SET hex = '#708090' WHERE name = 'Slate Gray Sparkle'; +UPDATE colors SET hex = '#FFD54F' WHERE name = 'Solar Breeze'; +UPDATE colors SET hex = '#00BCD4' WHERE name = 'South Beach'; +UPDATE colors SET hex = '#FEC600' WHERE name = 'Sunflower Yellow'; +UPDATE colors SET hex = '#009FA1' WHERE name = 'Teal'; +UPDATE colors SET hex = '#8A8D8F' WHERE name = 'Titan Gray'; +UPDATE colors SET hex = '#A9A9A9' WHERE name = 'Translucent Gray'; +UPDATE colors SET hex = '#8B4513' WHERE name = 'Translucent Brown'; +UPDATE colors SET hex = '#ADD8E6' WHERE name = 'Translucent Light Blue'; +UPDATE colors SET hex = '#808000' WHERE name = 'Translucent Olive'; +UPDATE colors SET hex = '#FF8C00' WHERE name = 'Translucent Orange'; +UPDATE colors SET hex = '#FFB6C1' WHERE name = 'Translucent Pink'; +UPDATE colors SET hex = '#800080' WHERE name = 'Translucent Purple'; +UPDATE colors SET hex = '#008B8B' WHERE name = 'Translucent Teal'; +UPDATE colors SET hex = '#E8E8E8' WHERE name = 'Transparent'; +UPDATE colors SET hex = '#3B0A45' WHERE name = 'Velvet Eclipse'; +UPDATE colors SET hex = '#583061' WHERE name = 'Violet Purple'; +UPDATE colors SET hex = '#E8E8E8' WHERE name = 'White Marble'; +UPDATE colors SET hex = '#C8B88A' WHERE name = 'White Oak';