2025-12-08 10:55:38 +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-11-29 16:58:28 +00:00
|
|
|
ALTER TABLE static_data DROP CONSTRAINT IF EXISTS chk_category;
|
|
|
|
|
|
2025-12-08 10:55:38 +00:00
|
|
|
ALTER TABLE static_data
|
|
|
|
|
ADD CONSTRAINT chk_category
|
|
|
|
|
CHECK (category IN (
|
|
|
|
|
'constellation',
|
|
|
|
|
'galaxy',
|
|
|
|
|
'star',
|
|
|
|
|
'nebula',
|
|
|
|
|
'cluster',
|
|
|
|
|
'asteroid_belt',
|
|
|
|
|
'kuiper_belt',
|
|
|
|
|
'interstellar'
|
|
|
|
|
));
|