sojorn/migrations/tests/create_test_flag.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

30 lines
607 B
SQL

-- Create a new test moderation flag to see if it appears in Directus
INSERT INTO moderation_flags (
post_id,
flag_reason,
scores,
status,
created_at
) VALUES (
gen_random_uuid(),
'greed',
'{"hate": 0.1, "greed": 0.8, "delusion": 0.3}',
'pending',
NOW()
);
-- Verify it was created
SELECT 'New test flag created:' as info;
SELECT
flag_reason,
status,
scores,
created_at
FROM moderation_flags
ORDER BY created_at DESC
LIMIT 1;
-- Show total count
SELECT 'Total flags in database:' as info;
SELECT COUNT(*) as total_count FROM moderation_flags;