cosmo_backend/scripts/update_category_constraint.sql

17 lines
466 B
MySQL
Raw Permalink Normal View History

2025-12-06 09:06:10 +00:00
-- Update check constraint for static_data table to include 'interstellar'
-- Run this manually via: python backend/scripts/run_sql.py backend/scripts/update_category_constraint.sql
2025-12-02 06:29:38 +00:00
ALTER TABLE static_data DROP CONSTRAINT IF EXISTS chk_category;
2025-12-06 09:06:10 +00:00
ALTER TABLE static_data
ADD CONSTRAINT chk_category
CHECK (category IN (
'constellation',
'galaxy',
'star',
'nebula',
'cluster',
'asteroid_belt',
'kuiper_belt',
'interstellar'
));