AI Resource Pro / website / scripts / verify-migration.sql
| 1 | -- Check table structure |
| 2 | SELECT column_name, data_type |
| 3 | FROM information_schema.columns |
| 4 | WHERE table_name = 'posts' |
| 5 | ORDER BY ordinal_position; |
| 6 | |
| 7 | -- Show a sample post with its categories |
| 8 | SELECT |
| 9 | bp.title, |
| 10 | array_agg(c.name) as categories |
| 11 | FROM posts bp |
| 12 | JOIN post_categories bpc ON bpc.post_id = bp.id |
| 13 | JOIN categories c ON c.id = bpc.category_id |
| 14 | GROUP BY bp.id, bp.title |
| 15 | LIMIT 1; |