cosmo/backend/scripts/update_category_constraint.sql

7 lines
287 B
MySQL
Raw Normal View History

2025-11-29 16:58:28 +00:00
-- Remove the old constraint
ALTER TABLE static_data DROP CONSTRAINT IF EXISTS chk_category;
-- Add the updated constraint
ALTER TABLE static_data ADD CONSTRAINT chk_category
CHECK (category IN ('constellation', 'galaxy', 'star', 'nebula', 'cluster', 'asteroid_belt', 'kuiper_belt'));