@bash-app/bash-common 30.289.0 → 30.292.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/definitions.d.ts +4 -0
  2. package/dist/definitions.d.ts.map +1 -1
  3. package/dist/definitions.js +4 -0
  4. package/dist/definitions.js.map +1 -1
  5. package/dist/extendedSchemas.d.ts +131 -9
  6. package/dist/extendedSchemas.d.ts.map +1 -1
  7. package/dist/extendedSchemas.js +9 -0
  8. package/dist/extendedSchemas.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/utils/__tests__/entertainmentServiceTypeOptions.test.d.ts +2 -0
  14. package/dist/utils/__tests__/entertainmentServiceTypeOptions.test.d.ts.map +1 -0
  15. package/dist/utils/__tests__/entertainmentServiceTypeOptions.test.js +17 -0
  16. package/dist/utils/__tests__/entertainmentServiceTypeOptions.test.js.map +1 -0
  17. package/dist/utils/entertainmentServiceTypeOptions.d.ts +9 -0
  18. package/dist/utils/entertainmentServiceTypeOptions.d.ts.map +1 -0
  19. package/dist/utils/entertainmentServiceTypeOptions.js +46 -0
  20. package/dist/utils/entertainmentServiceTypeOptions.js.map +1 -0
  21. package/dist/utils/luxonUtils.d.ts.map +1 -1
  22. package/dist/utils/luxonUtils.js +20 -8
  23. package/dist/utils/luxonUtils.js.map +1 -1
  24. package/dist/utils/recurrenceUtils.d.ts.map +1 -1
  25. package/dist/utils/recurrenceUtils.js +7 -3
  26. package/dist/utils/recurrenceUtils.js.map +1 -1
  27. package/package.json +1 -1
  28. package/prisma/schema.prisma +54 -0
  29. package/src/definitions.ts +6 -0
  30. package/src/extendedSchemas.ts +81 -10
  31. package/src/index.ts +1 -0
  32. package/src/utils/__tests__/entertainmentServiceTypeOptions.test.ts +18 -0
  33. package/src/utils/entertainmentServiceTypeOptions.ts +56 -0
  34. package/src/utils/luxonUtils.ts +22 -14
  35. package/src/utils/recurrenceUtils.ts +6 -3
  36. package/prisma/prisma/COMPREHENSIVE-MIGRATION-README.md +0 -295
  37. package/prisma/prisma/MIGRATION-CHECKLIST.md +0 -198
  38. package/prisma/prisma/MIGRATION-FILES-GUIDE.md +0 -76
  39. package/prisma/prisma/comprehensive-migration-20260120.sql +0 -5751
  40. package/prisma/prisma/delta-migration-20260120.sql +0 -302
  41. package/prisma/prisma/manual-migration-add-missing-columns.sql +0 -182
  42. package/prisma/prisma/migrations/competition-prize-catalog-entry-tier.sql +0 -39
  43. package/prisma/prisma/quick-migration.sql +0 -47
  44. package/prisma/prisma/schema.prisma +0 -10850
  45. package/prisma/prisma/verify-migration.sql +0 -132
@@ -1,132 +0,0 @@
1
- -- ============================================================================
2
- -- POST-MIGRATION VERIFICATION SCRIPT
3
- -- Run this after applying comprehensive-migration-20260120.sql
4
- -- ============================================================================
5
-
6
- -- 1. Count all tables (expect 160+)
7
- SELECT COUNT(*) as total_tables
8
- FROM information_schema.tables
9
- WHERE table_schema = 'public';
10
-
11
- -- 2. Count all enums (expect 170+)
12
- SELECT COUNT(*) as total_enums
13
- FROM pg_type
14
- WHERE typtype = 'e';
15
-
16
- -- 3. Count all indexes (expect 400+)
17
- SELECT COUNT(*) as total_indexes
18
- FROM pg_indexes
19
- WHERE schemaname = 'public';
20
-
21
- -- 4. Verify critical tables exist
22
- SELECT
23
- CASE
24
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'User') THEN '✅'
25
- ELSE '❌'
26
- END as "User",
27
- CASE
28
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'BashEvent') THEN '✅'
29
- ELSE '❌'
30
- END as "BashEvent",
31
- CASE
32
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'Service') THEN '✅'
33
- ELSE '❌'
34
- END as "Service",
35
- CASE
36
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'Ticket') THEN '✅'
37
- ELSE '❌'
38
- END as "Ticket",
39
- CASE
40
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'BashFeedPost') THEN '✅'
41
- ELSE '❌'
42
- END as "BashFeedPost",
43
- CASE
44
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'Competition') THEN '✅'
45
- ELSE '❌'
46
- END as "Competition",
47
- CASE
48
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'Organization') THEN '✅'
49
- ELSE '❌'
50
- END as "Organization",
51
- CASE
52
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'TaskComment') THEN '✅'
53
- ELSE '❌'
54
- END as "TaskComment",
55
- CASE
56
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'TaskInvitation') THEN '✅'
57
- ELSE '❌'
58
- END as "TaskInvitation",
59
- CASE
60
- WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'AuditLog') THEN '✅'
61
- ELSE '❌'
62
- END as "AuditLog";
63
-
64
- -- 5. Verify critical enums exist
65
- SELECT
66
- CASE
67
- WHEN EXISTS (SELECT 1 FROM pg_type WHERE typname = 'BashStatus') THEN '✅'
68
- ELSE '❌'
69
- END as "BashStatus",
70
- CASE
71
- WHEN EXISTS (SELECT 1 FROM pg_type WHERE typname = 'ServiceStatus') THEN '✅'
72
- ELSE '❌'
73
- END as "ServiceStatus",
74
- CASE
75
- WHEN EXISTS (SELECT 1 FROM pg_type WHERE typname = 'NotificationType') THEN '✅'
76
- ELSE '❌'
77
- END as "NotificationType",
78
- CASE
79
- WHEN EXISTS (SELECT 1 FROM pg_type WHERE typname = 'Privacy') THEN '✅'
80
- ELSE '❌'
81
- END as "Privacy";
82
-
83
- -- 6. Check for any foreign key constraint errors
84
- SELECT
85
- conname as constraint_name,
86
- conrelid::regclass as table_name,
87
- confrelid::regclass as referenced_table
88
- FROM pg_constraint
89
- WHERE contype = 'f'
90
- AND connamespace = 'public'::regnamespace
91
- LIMIT 10;
92
-
93
- -- 7. Verify specific columns from November migration
94
- SELECT
95
- CASE
96
- WHEN EXISTS (
97
- SELECT 1 FROM information_schema.columns
98
- WHERE table_name = 'Service' AND column_name = 'acceptsBashCash'
99
- ) THEN '✅ Service.acceptsBashCash exists'
100
- ELSE '❌ Service.acceptsBashCash MISSING'
101
- END as service_column,
102
- CASE
103
- WHEN EXISTS (
104
- SELECT 1 FROM information_schema.columns
105
- WHERE table_name = 'User' AND column_name = 'isLightweightAccount'
106
- ) THEN '✅ User.isLightweightAccount exists'
107
- ELSE '❌ User.isLightweightAccount MISSING'
108
- END as user_column;
109
-
110
- -- 8. List all tables (alphabetically)
111
- SELECT table_name
112
- FROM information_schema.tables
113
- WHERE table_schema = 'public'
114
- AND table_type = 'BASE TABLE'
115
- ORDER BY table_name;
116
-
117
- -- ============================================================================
118
- -- Expected Results
119
- -- ============================================================================
120
- --
121
- -- Query 1: total_tables should be 160+
122
- -- Query 2: total_enums should be 170+
123
- -- Query 3: total_indexes should be 400+
124
- -- Query 4: All columns should show ✅
125
- -- Query 5: All enums should show ✅
126
- -- Query 6: Should return 10 foreign keys without errors
127
- -- Query 7: Both columns should show ✅
128
- -- Query 8: Should list all your tables alphabetically
129
- --
130
- -- If any ❌ appears, the migration may have failed partially
131
- -- Check postgres logs for errors
132
- -- ============================================================================