sojorn/migrations/tests/check_collection_config.sql
Patrick Britton 0bb1dd4055 feat: organize SQL scripts into structured migration folders
- Create organized migration folder structure:
  - database/ - Core schema changes and migrations
  - tests/ - Test scripts and verification queries
  - directus/ - Directus CMS configuration scripts
  - fixes/ - Database fixes and patches
  - archive/ - Historical and deprecated scripts

- Move 60+ SQL files from root to appropriate folders
- Add comprehensive README with usage guidelines
- Consolidate old migrations_archive into new archive folder
- Maintain clear separation of concerns for different script types

Benefits:
- Cleaner project root directory
- Easier to find specific types of SQL scripts
- Better organization for maintenance and development
- Clear documentation for migration procedures
- Proper separation of production vs development scripts
2026-02-05 09:13:47 -06:00

12 lines
668 B
SQL

-- Check if Directus collections are properly configured
SELECT 'Directus collections configuration:' as info;
SELECT collection, icon, note FROM directus_collections WHERE collection IN ('moderation_flags', 'user_status_history');
-- Check if the actual tables exist and have data
SELECT 'Actual database tables:' as info;
SELECT table_name, table_type FROM information_schema.tables WHERE table_name IN ('moderation_flags', 'user_status_history');
-- Check if there are any field configurations
SELECT 'Field configurations for moderation_flags:' as info;
SELECT field_name, data_type, interface FROM directus_fields WHERE collection = 'moderation_flags' LIMIT 5;