@nexttylabs/echo 0.3.0 → 0.5.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 (248) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/app/(public)/[organizationSlug]/roadmap/page.tsx +19 -1
  3. package/app/api/admin/backup/route.ts +22 -4
  4. package/app/api/auth/register/handler.ts +1 -2
  5. package/lib/auth/config.ts +0 -7
  6. package/lib/db/migrations/0000_needy_leech.sql +335 -0
  7. package/lib/db/migrations/meta/0000_snapshot.json +2186 -1
  8. package/lib/db/migrations/meta/_journal.json +2 -135
  9. package/lib/db/schema/auth.ts +0 -1
  10. package/lib/db/schema/index.ts +0 -1
  11. package/lib/portal/public-context.tsx +5 -0
  12. package/package.json +20 -1
  13. package/.changeset/README.md +0 -21
  14. package/.changeset/config.json +0 -11
  15. package/.changeset/cozy-ghosts-care.md +0 -5
  16. package/.changeset/sharp-lines-stand.md +0 -5
  17. package/.changeset/sour-doodles-eat.md +0 -5
  18. package/.changeset/tender-moose-shop.md +0 -5
  19. package/.github/pull_request_template.md +0 -13
  20. package/.github/workflows/ci.yml +0 -41
  21. package/.github/workflows/publish.yml +0 -44
  22. package/.github/workflows/release.yml +0 -73
  23. package/AGENTS.md +0 -92
  24. package/Dockerfile +0 -57
  25. package/Makefile +0 -77
  26. package/app/api/internal/domain-lookup/route.ts +0 -67
  27. package/bun.lock +0 -2503
  28. package/components/portal/project-switcher.tsx +0 -20
  29. package/docker-compose.dev.yml +0 -26
  30. package/docker-compose.yml +0 -98
  31. package/docs/architecture.md +0 -259
  32. package/docs/component-inventory.md +0 -261
  33. package/docs/database-migrations.md +0 -76
  34. package/docs/development-guide.md +0 -209
  35. package/docs/e2e-user-flows.csv +0 -31
  36. package/docs/er-diagram-feedback.mmd +0 -138
  37. package/docs/er-diagram.mmd +0 -281
  38. package/docs/i18n-check-report.md +0 -296
  39. package/docs/index.md +0 -214
  40. package/docs/logic-chain.md +0 -94
  41. package/docs/plans/2026-01-02-database-migration-scripts.md +0 -496
  42. package/docs/plans/2026-01-02-user-login-design.md +0 -37
  43. package/docs/plans/2026-01-02-user-login.md +0 -437
  44. package/docs/plans/2026-01-02-user-registration-design.md +0 -47
  45. package/docs/plans/2026-01-02-user-registration.md +0 -628
  46. package/docs/plans/2026-01-03-roles-permissions-design.md +0 -20
  47. package/docs/plans/2026-01-03-roles-permissions.md +0 -266
  48. package/docs/plans/2026-01-05-authentication-middleware.md +0 -207
  49. package/docs/plans/2026-01-05-member-removal.md +0 -186
  50. package/docs/plans/2026-01-05-organization-creation.md +0 -374
  51. package/docs/plans/2026-01-05-rbac-middleware.md +0 -112
  52. package/docs/plans/2026-01-05-role-configuration.md +0 -441
  53. package/docs/plans/2026-01-06-file-upload-support.md +0 -804
  54. package/docs/plans/2026-01-06-permission-check-hook.md +0 -155
  55. package/docs/plans/2026-01-06-resource-ownership-check.md +0 -231
  56. package/docs/plans/2026-01-07-feedback-tracking-link.md +0 -459
  57. package/docs/plans/2026-01-09-logout-redirect-design.md +0 -52
  58. package/docs/plans/2026-01-09-phase2-3-plan.md +0 -654
  59. package/docs/plans/2026-01-09-portal-execution-plan.md +0 -408
  60. package/docs/plans/2026-01-09-project-delete-feature-design.md +0 -163
  61. package/docs/plans/2026-01-09-project-delete-implementation.md +0 -451
  62. package/docs/plans/2026-01-09-project-edit-delete-design.md +0 -52
  63. package/docs/plans/2026-01-09-settings-center-design.md +0 -114
  64. package/docs/plans/2026-01-09-settings-center.md +0 -948
  65. package/docs/plans/2026-01-10-organization-only-design.md +0 -66
  66. package/docs/plans/2026-01-10-organization-only-implementation.md +0 -433
  67. package/docs/plans/2026-01-10-portal-settings-restructure-plan.md +0 -18
  68. package/docs/plans/2026-01-10-project-settings-tabs-design-implementation.md +0 -296
  69. package/docs/plans/2026-01-14-e2e-playwright-feedback.md +0 -173
  70. package/docs/plans/2026-01-15-feedback-management-org-context-design.md +0 -82
  71. package/docs/plans/2026-01-15-feedback-management-org-context-implementation-plan.md +0 -521
  72. package/docs/plans/2026-01-16-admin-feedback-filters-design.md +0 -75
  73. package/docs/plans/2026-01-16-admin-feedback-filters-implementation.md +0 -293
  74. package/docs/plans/2026-01-16-admin-feedback-route-consolidation.md +0 -180
  75. package/docs/plans/2026-01-16-e2e-test-fixes.md +0 -158
  76. package/docs/plans/2026-01-17-admin-feedback-filters.md +0 -214
  77. package/docs/plans/2026-01-17-admin-feedback-improvements.md +0 -453
  78. package/docs/plans/2026-01-18-changesets-design.md +0 -40
  79. package/docs/product_changes.md +0 -37
  80. package/docs/project-overview.md +0 -159
  81. package/docs/project-scan-report.json +0 -104
  82. package/docs/route-role-visibility.md +0 -51
  83. package/docs/source-tree-analysis.md +0 -150
  84. package/docs/testing/delete-project-manual-tests.md +0 -18
  85. package/docs/user-story-tracking.md +0 -191
  86. package/eslint.config.mjs +0 -19
  87. package/lib/db/migrations/.gitkeep +0 -0
  88. package/lib/db/migrations/0000_cynical_gladiator.sql +0 -53
  89. package/lib/db/migrations/0001_wandering_sunfire.sql +0 -27
  90. package/lib/db/migrations/0002_shallow_speedball.sql +0 -1
  91. package/lib/db/migrations/0003_add_org_description.sql +0 -1
  92. package/lib/db/migrations/0003_boring_wild_pack.sql +0 -13
  93. package/lib/db/migrations/0004_windy_tyrannus.sql +0 -27
  94. package/lib/db/migrations/0005_perpetual_doorman.sql +0 -5
  95. package/lib/db/migrations/0006_aberrant_captain_midlands.sql +0 -13
  96. package/lib/db/migrations/0007_clever_captain_cross.sql +0 -14
  97. package/lib/db/migrations/0008_sparkling_pandemic.sql +0 -2
  98. package/lib/db/migrations/0009_happy_black_tom.sql +0 -29
  99. package/lib/db/migrations/0010_kind_junta.sql +0 -8
  100. package/lib/db/migrations/0011_mute_squadron_supreme.sql +0 -25
  101. package/lib/db/migrations/0012_giant_power_man.sql +0 -24
  102. package/lib/db/migrations/0013_damp_titanium_man.sql +0 -17
  103. package/lib/db/migrations/0014_blue_alice.sql +0 -18
  104. package/lib/db/migrations/0015_webhook_tables.sql +0 -41
  105. package/lib/db/migrations/0016_github_integration.sql +0 -30
  106. package/lib/db/migrations/0016_overjoyed_ghost_rider.sql +0 -22
  107. package/lib/db/migrations/0017_slimy_inhumans.sql +0 -6
  108. package/lib/db/migrations/0018_same_spitfire.sql +0 -1
  109. package/lib/db/migrations/0019_jittery_loners.sql +0 -16
  110. package/lib/db/migrations/0019_remove_projects_add_org_settings.sql +0 -14
  111. package/lib/db/migrations/meta/0001_snapshot.json +0 -553
  112. package/lib/db/migrations/meta/0002_snapshot.json +0 -560
  113. package/lib/db/migrations/meta/0003_snapshot.json +0 -650
  114. package/lib/db/migrations/meta/0004_snapshot.json +0 -852
  115. package/lib/db/migrations/meta/0005_snapshot.json +0 -900
  116. package/lib/db/migrations/meta/0006_snapshot.json +0 -1011
  117. package/lib/db/migrations/meta/0007_snapshot.json +0 -1125
  118. package/lib/db/migrations/meta/0008_snapshot.json +0 -1146
  119. package/lib/db/migrations/meta/0009_snapshot.json +0 -1386
  120. package/lib/db/migrations/meta/0010_snapshot.json +0 -1419
  121. package/lib/db/migrations/meta/0011_snapshot.json +0 -1615
  122. package/lib/db/migrations/meta/0012_snapshot.json +0 -1805
  123. package/lib/db/migrations/meta/0013_snapshot.json +0 -1948
  124. package/lib/db/migrations/meta/0014_snapshot.json +0 -2082
  125. package/lib/db/migrations/meta/0015_snapshot.json +0 -2476
  126. package/lib/db/migrations/meta/0016_snapshot.json +0 -2633
  127. package/lib/db/migrations/meta/0017_snapshot.json +0 -2680
  128. package/lib/db/migrations/meta/0018_snapshot.json +0 -2686
  129. package/lib/db/migrations/meta/0019_snapshot.json +0 -2741
  130. package/lib/db/schema/projects.ts +0 -145
  131. package/lib/db/schema/user-profiles.ts +0 -31
  132. package/lib/validations/projects.ts +0 -49
  133. package/next-env.d.ts +0 -6
  134. package/playwright.config.ts +0 -44
  135. package/proxy.test.ts +0 -131
  136. package/proxy.ts +0 -190
  137. package/scripts/backup-db.sh +0 -57
  138. package/scripts/backup-db.ts +0 -24
  139. package/scripts/generate-openapi.ts +0 -22
  140. package/scripts/migration-helper.ts +0 -39
  141. package/scripts/pre-deploy.ts +0 -75
  142. package/scripts/restore-db.sh +0 -60
  143. package/scripts/rollback.ts +0 -72
  144. package/scripts/seed-tags.ts +0 -48
  145. package/tests/api/feedback-bulk.test.ts +0 -47
  146. package/tests/api/feedback-by-id.test.ts +0 -67
  147. package/tests/api/feedback-comments-route-import.test.ts +0 -26
  148. package/tests/api/feedback-create.test.ts +0 -71
  149. package/tests/api/feedback-delete.test.ts +0 -160
  150. package/tests/api/feedback-filter.test.ts +0 -250
  151. package/tests/api/feedback-list.test.ts +0 -234
  152. package/tests/api/feedback-route-assignee-condition.test.ts +0 -32
  153. package/tests/api/feedback-similar.test.ts +0 -46
  154. package/tests/api/feedback-sort.test.ts +0 -261
  155. package/tests/api/feedback-status-enum.test.ts +0 -49
  156. package/tests/api/feedback-status-filter.test.ts +0 -117
  157. package/tests/api/feedback-submit-on-behalf.test.ts +0 -269
  158. package/tests/api/feedback.test.ts +0 -175
  159. package/tests/api/identify-jwt.test.ts +0 -25
  160. package/tests/api/invitation-accept.test.ts +0 -213
  161. package/tests/api/organization-invitations.test.ts +0 -186
  162. package/tests/api/organization-members-list.test.ts +0 -79
  163. package/tests/api/organization-members.test.ts +0 -340
  164. package/tests/api/organizations.test.ts +0 -149
  165. package/tests/api/register.test.ts +0 -112
  166. package/tests/api/upload.test.ts +0 -103
  167. package/tests/api/vote.test.ts +0 -82
  168. package/tests/app/admin-feedback-detail-page.test.tsx +0 -25
  169. package/tests/app/admin-feedback-list-page.test.tsx +0 -25
  170. package/tests/app/admin-feedback-new-page.test.tsx +0 -25
  171. package/tests/app/health-route-helpers.test.ts +0 -27
  172. package/tests/app/login-page.test.ts +0 -26
  173. package/tests/app/portal-page.test.ts +0 -29
  174. package/tests/app/project-portal-overview.test.tsx +0 -25
  175. package/tests/app/widget-page-import.test.ts +0 -25
  176. package/tests/components/create-post-dialog-defaults.test.ts +0 -43
  177. package/tests/components/feedback/duplicate-suggestions-inline.test.tsx +0 -27
  178. package/tests/components/feedback/embedded-feedback-form.test.tsx +0 -96
  179. package/tests/components/feedback/feedback-detail.test.tsx +0 -25
  180. package/tests/components/feedback/feedback-stats.test.tsx +0 -49
  181. package/tests/components/feedback-bulk-actions.test.tsx +0 -39
  182. package/tests/components/feedback-i18n-keys.test.ts +0 -70
  183. package/tests/components/feedback-list-controls-compile.test.ts +0 -25
  184. package/tests/components/feedback-list-controls.test.tsx +0 -204
  185. package/tests/components/feedback-list-item.test.tsx +0 -67
  186. package/tests/components/landing/hero.test.tsx +0 -46
  187. package/tests/components/layout/language-switcher.test.tsx +0 -25
  188. package/tests/components/layout/sidebar.test.tsx +0 -157
  189. package/tests/components/login-form.test.ts +0 -25
  190. package/tests/components/organization-form.test.ts +0 -32
  191. package/tests/components/organization-switcher.test.ts +0 -25
  192. package/tests/components/pagination.test.tsx +0 -43
  193. package/tests/components/portal-overview.test.tsx +0 -25
  194. package/tests/components/profile-form.test.tsx +0 -139
  195. package/tests/components/role-selector.test.ts +0 -31
  196. package/tests/components/status-chart.test.tsx +0 -90
  197. package/tests/e2e/auth.e2e.ts +0 -323
  198. package/tests/e2e/feedback-actions.e2e.ts +0 -471
  199. package/tests/e2e/feedback-attachment.e2e.ts +0 -168
  200. package/tests/e2e/feedback-customer.e2e.ts +0 -226
  201. package/tests/e2e/feedback-management.e2e.ts +0 -565
  202. package/tests/e2e/feedback-submit.e2e.ts +0 -133
  203. package/tests/e2e/feedback-view.e2e.ts +0 -297
  204. package/tests/e2e/fixtures/test-data.ts +0 -235
  205. package/tests/e2e/health-check.e2e.ts +0 -230
  206. package/tests/e2e/helpers/test-utils-helpers.test.ts +0 -43
  207. package/tests/e2e/helpers/test-utils.ts +0 -298
  208. package/tests/e2e/integration-placeholders.e2e.ts +0 -199
  209. package/tests/e2e/organization.e2e.ts +0 -292
  210. package/tests/e2e/permissions.e2e.ts +0 -424
  211. package/tests/e2e/project-widget.e2e.ts +0 -63
  212. package/tests/feedback/filters.test.ts +0 -29
  213. package/tests/hooks/use-permissions.test.ts +0 -52
  214. package/tests/lib/ai/classifier.test.ts +0 -104
  215. package/tests/lib/ai/duplicate-detector.test.ts +0 -234
  216. package/tests/lib/attachments-schema.test.ts +0 -30
  217. package/tests/lib/auth/session.test.ts +0 -49
  218. package/tests/lib/auth-client.test.ts +0 -37
  219. package/tests/lib/auth-config.test.ts +0 -26
  220. package/tests/lib/feedback-prefill.test.ts +0 -52
  221. package/tests/lib/feedback-processor.test.ts +0 -41
  222. package/tests/lib/feedback-schema.test.ts +0 -33
  223. package/tests/lib/file-validator.test.ts +0 -48
  224. package/tests/lib/get-feedback-by-id.test.ts +0 -37
  225. package/tests/lib/invitations.test.ts +0 -35
  226. package/tests/lib/login-schema.test.ts +0 -36
  227. package/tests/lib/org-context.test.ts +0 -95
  228. package/tests/lib/organization-access.test.ts +0 -44
  229. package/tests/lib/organization-member-role-schema.test.ts +0 -41
  230. package/tests/lib/permissions.test.ts +0 -88
  231. package/tests/lib/portal-analytics.test.ts +0 -25
  232. package/tests/lib/portal-contributors.test.ts +0 -25
  233. package/tests/lib/portal-copy.test.ts +0 -27
  234. package/tests/lib/portal-i18n.test.ts +0 -30
  235. package/tests/lib/portal-leaderboard-settings.test.ts +0 -25
  236. package/tests/lib/portal-modules.test.ts +0 -25
  237. package/tests/lib/portal-seo.test.ts +0 -25
  238. package/tests/lib/portal-sharing.test.ts +0 -25
  239. package/tests/lib/portal-sorting.test.ts +0 -25
  240. package/tests/lib/portal-theme.test.ts +0 -25
  241. package/tests/lib/rate-limit.test.ts +0 -142
  242. package/tests/lib/resolve-locale.test.ts +0 -34
  243. package/tests/lib/services/backup.test.ts +0 -145
  244. package/tests/lib/user-organizations.test.ts +0 -42
  245. package/tests/lib/user-role-schema.test.ts +0 -33
  246. package/tests/lib/user-schema.test.ts +0 -25
  247. package/tests/setup.ts +0 -74
  248. package/vercel.json +0 -4
@@ -1,9 +1,339 @@
1
1
  {
2
- "id": "44c1638e-ba7c-460b-a6ac-342601d382b3",
2
+ "id": "ff65eda1-cab4-4523-ae6f-05704f9d00d8",
3
3
  "prevId": "00000000-0000-0000-0000-000000000000",
4
4
  "version": "7",
5
5
  "dialect": "postgresql",
6
6
  "tables": {
7
+ "public.ai_processing_results": {
8
+ "name": "ai_processing_results",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "serial",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "feedbackId": {
18
+ "name": "feedbackId",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "classification": {
24
+ "name": "classification",
25
+ "type": "jsonb",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "tagSuggestions": {
30
+ "name": "tagSuggestions",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "duplicateCandidates": {
36
+ "name": "duplicateCandidates",
37
+ "type": "jsonb",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "processingTime": {
42
+ "name": "processingTime",
43
+ "type": "integer",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "status": {
48
+ "name": "status",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "'pending'"
53
+ },
54
+ "errorMessage": {
55
+ "name": "errorMessage",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": false
59
+ },
60
+ "createdAt": {
61
+ "name": "createdAt",
62
+ "type": "timestamp",
63
+ "primaryKey": false,
64
+ "notNull": true,
65
+ "default": "now()"
66
+ },
67
+ "updatedAt": {
68
+ "name": "updatedAt",
69
+ "type": "timestamp",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "default": "now()"
73
+ }
74
+ },
75
+ "indexes": {
76
+ "idx_ai_results_feedback": {
77
+ "name": "idx_ai_results_feedback",
78
+ "columns": [
79
+ {
80
+ "expression": "feedbackId",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ }
85
+ ],
86
+ "isUnique": false,
87
+ "concurrently": false,
88
+ "method": "btree",
89
+ "with": {}
90
+ },
91
+ "idx_ai_results_status": {
92
+ "name": "idx_ai_results_status",
93
+ "columns": [
94
+ {
95
+ "expression": "status",
96
+ "isExpression": false,
97
+ "asc": true,
98
+ "nulls": "last"
99
+ }
100
+ ],
101
+ "isUnique": false,
102
+ "concurrently": false,
103
+ "method": "btree",
104
+ "with": {}
105
+ }
106
+ },
107
+ "foreignKeys": {
108
+ "ai_processing_results_feedbackId_feedback_feedbackId_fk": {
109
+ "name": "ai_processing_results_feedbackId_feedback_feedbackId_fk",
110
+ "tableFrom": "ai_processing_results",
111
+ "tableTo": "feedback",
112
+ "columnsFrom": [
113
+ "feedbackId"
114
+ ],
115
+ "columnsTo": [
116
+ "feedbackId"
117
+ ],
118
+ "onDelete": "cascade",
119
+ "onUpdate": "no action"
120
+ }
121
+ },
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "policies": {},
125
+ "checkConstraints": {},
126
+ "isRLSEnabled": false
127
+ },
128
+ "public.api_keys": {
129
+ "name": "api_keys",
130
+ "schema": "",
131
+ "columns": {
132
+ "keyId": {
133
+ "name": "keyId",
134
+ "type": "serial",
135
+ "primaryKey": true,
136
+ "notNull": true
137
+ },
138
+ "name": {
139
+ "name": "name",
140
+ "type": "text",
141
+ "primaryKey": false,
142
+ "notNull": true
143
+ },
144
+ "hashedKey": {
145
+ "name": "hashedKey",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "prefix": {
151
+ "name": "prefix",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true
155
+ },
156
+ "organizationId": {
157
+ "name": "organizationId",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ },
162
+ "disabled": {
163
+ "name": "disabled",
164
+ "type": "boolean",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "default": false
168
+ },
169
+ "lastUsed": {
170
+ "name": "lastUsed",
171
+ "type": "timestamp",
172
+ "primaryKey": false,
173
+ "notNull": false
174
+ },
175
+ "createdAt": {
176
+ "name": "createdAt",
177
+ "type": "timestamp",
178
+ "primaryKey": false,
179
+ "notNull": true,
180
+ "default": "now()"
181
+ },
182
+ "updatedAt": {
183
+ "name": "updatedAt",
184
+ "type": "timestamp",
185
+ "primaryKey": false,
186
+ "notNull": true,
187
+ "default": "now()"
188
+ }
189
+ },
190
+ "indexes": {
191
+ "idx_api_keys_hashedKey": {
192
+ "name": "idx_api_keys_hashedKey",
193
+ "columns": [
194
+ {
195
+ "expression": "hashedKey",
196
+ "isExpression": false,
197
+ "asc": true,
198
+ "nulls": "last"
199
+ }
200
+ ],
201
+ "isUnique": false,
202
+ "concurrently": false,
203
+ "method": "btree",
204
+ "with": {}
205
+ },
206
+ "idx_api_keys_orgId": {
207
+ "name": "idx_api_keys_orgId",
208
+ "columns": [
209
+ {
210
+ "expression": "organizationId",
211
+ "isExpression": false,
212
+ "asc": true,
213
+ "nulls": "last"
214
+ }
215
+ ],
216
+ "isUnique": false,
217
+ "concurrently": false,
218
+ "method": "btree",
219
+ "with": {}
220
+ }
221
+ },
222
+ "foreignKeys": {
223
+ "api_keys_organizationId_organizations_id_fk": {
224
+ "name": "api_keys_organizationId_organizations_id_fk",
225
+ "tableFrom": "api_keys",
226
+ "tableTo": "organizations",
227
+ "columnsFrom": [
228
+ "organizationId"
229
+ ],
230
+ "columnsTo": [
231
+ "id"
232
+ ],
233
+ "onDelete": "cascade",
234
+ "onUpdate": "no action"
235
+ }
236
+ },
237
+ "compositePrimaryKeys": {},
238
+ "uniqueConstraints": {
239
+ "api_keys_hashedKey_unique": {
240
+ "name": "api_keys_hashedKey_unique",
241
+ "nullsNotDistinct": false,
242
+ "columns": [
243
+ "hashedKey"
244
+ ]
245
+ }
246
+ },
247
+ "policies": {},
248
+ "checkConstraints": {},
249
+ "isRLSEnabled": false
250
+ },
251
+ "public.attachments": {
252
+ "name": "attachments",
253
+ "schema": "",
254
+ "columns": {
255
+ "attachmentId": {
256
+ "name": "attachmentId",
257
+ "type": "serial",
258
+ "primaryKey": true,
259
+ "notNull": true
260
+ },
261
+ "feedbackId": {
262
+ "name": "feedbackId",
263
+ "type": "integer",
264
+ "primaryKey": false,
265
+ "notNull": true
266
+ },
267
+ "fileName": {
268
+ "name": "fileName",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": true
272
+ },
273
+ "filePath": {
274
+ "name": "filePath",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": true
278
+ },
279
+ "fileSize": {
280
+ "name": "fileSize",
281
+ "type": "integer",
282
+ "primaryKey": false,
283
+ "notNull": true
284
+ },
285
+ "mimeType": {
286
+ "name": "mimeType",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true
290
+ },
291
+ "createdAt": {
292
+ "name": "createdAt",
293
+ "type": "timestamp",
294
+ "primaryKey": false,
295
+ "notNull": true,
296
+ "default": "now()"
297
+ }
298
+ },
299
+ "indexes": {
300
+ "idx_attachments_feedbackId": {
301
+ "name": "idx_attachments_feedbackId",
302
+ "columns": [
303
+ {
304
+ "expression": "feedbackId",
305
+ "isExpression": false,
306
+ "asc": true,
307
+ "nulls": "last"
308
+ }
309
+ ],
310
+ "isUnique": false,
311
+ "concurrently": false,
312
+ "method": "btree",
313
+ "with": {}
314
+ }
315
+ },
316
+ "foreignKeys": {
317
+ "attachments_feedbackId_feedback_feedbackId_fk": {
318
+ "name": "attachments_feedbackId_feedback_feedbackId_fk",
319
+ "tableFrom": "attachments",
320
+ "tableTo": "feedback",
321
+ "columnsFrom": [
322
+ "feedbackId"
323
+ ],
324
+ "columnsTo": [
325
+ "feedbackId"
326
+ ],
327
+ "onDelete": "cascade",
328
+ "onUpdate": "no action"
329
+ }
330
+ },
331
+ "compositePrimaryKeys": {},
332
+ "uniqueConstraints": {},
333
+ "policies": {},
334
+ "checkConstraints": {},
335
+ "isRLSEnabled": false
336
+ },
7
337
  "public.account": {
8
338
  "name": "account",
9
339
  "schema": "",
@@ -358,6 +688,1861 @@
358
688
  "policies": {},
359
689
  "checkConstraints": {},
360
690
  "isRLSEnabled": false
691
+ },
692
+ "public.comments": {
693
+ "name": "comments",
694
+ "schema": "",
695
+ "columns": {
696
+ "commentId": {
697
+ "name": "commentId",
698
+ "type": "serial",
699
+ "primaryKey": true,
700
+ "notNull": true
701
+ },
702
+ "feedbackId": {
703
+ "name": "feedbackId",
704
+ "type": "serial",
705
+ "primaryKey": false,
706
+ "notNull": true
707
+ },
708
+ "userId": {
709
+ "name": "userId",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": false
713
+ },
714
+ "authorName": {
715
+ "name": "authorName",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": false
719
+ },
720
+ "authorEmail": {
721
+ "name": "authorEmail",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": false
725
+ },
726
+ "guestToken": {
727
+ "name": "guestToken",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": false
731
+ },
732
+ "content": {
733
+ "name": "content",
734
+ "type": "text",
735
+ "primaryKey": false,
736
+ "notNull": true
737
+ },
738
+ "isInternal": {
739
+ "name": "isInternal",
740
+ "type": "boolean",
741
+ "primaryKey": false,
742
+ "notNull": true,
743
+ "default": true
744
+ },
745
+ "createdAt": {
746
+ "name": "createdAt",
747
+ "type": "timestamp",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "default": "now()"
751
+ },
752
+ "updatedAt": {
753
+ "name": "updatedAt",
754
+ "type": "timestamp",
755
+ "primaryKey": false,
756
+ "notNull": true,
757
+ "default": "now()"
758
+ }
759
+ },
760
+ "indexes": {
761
+ "idx_comments_feedbackId": {
762
+ "name": "idx_comments_feedbackId",
763
+ "columns": [
764
+ {
765
+ "expression": "feedbackId",
766
+ "isExpression": false,
767
+ "asc": true,
768
+ "nulls": "last"
769
+ }
770
+ ],
771
+ "isUnique": false,
772
+ "concurrently": false,
773
+ "method": "btree",
774
+ "with": {}
775
+ },
776
+ "idx_comments_isInternal": {
777
+ "name": "idx_comments_isInternal",
778
+ "columns": [
779
+ {
780
+ "expression": "isInternal",
781
+ "isExpression": false,
782
+ "asc": true,
783
+ "nulls": "last"
784
+ }
785
+ ],
786
+ "isUnique": false,
787
+ "concurrently": false,
788
+ "method": "btree",
789
+ "with": {}
790
+ },
791
+ "idx_comments_internal_feedbacks": {
792
+ "name": "idx_comments_internal_feedbacks",
793
+ "columns": [
794
+ {
795
+ "expression": "feedbackId",
796
+ "isExpression": false,
797
+ "asc": true,
798
+ "nulls": "last"
799
+ },
800
+ {
801
+ "expression": "isInternal",
802
+ "isExpression": false,
803
+ "asc": true,
804
+ "nulls": "last"
805
+ }
806
+ ],
807
+ "isUnique": false,
808
+ "concurrently": false,
809
+ "method": "btree",
810
+ "with": {}
811
+ },
812
+ "idx_comments_guestToken": {
813
+ "name": "idx_comments_guestToken",
814
+ "columns": [
815
+ {
816
+ "expression": "guestToken",
817
+ "isExpression": false,
818
+ "asc": true,
819
+ "nulls": "last"
820
+ }
821
+ ],
822
+ "isUnique": false,
823
+ "concurrently": false,
824
+ "method": "btree",
825
+ "with": {}
826
+ }
827
+ },
828
+ "foreignKeys": {
829
+ "comments_feedbackId_feedback_feedbackId_fk": {
830
+ "name": "comments_feedbackId_feedback_feedbackId_fk",
831
+ "tableFrom": "comments",
832
+ "tableTo": "feedback",
833
+ "columnsFrom": [
834
+ "feedbackId"
835
+ ],
836
+ "columnsTo": [
837
+ "feedbackId"
838
+ ],
839
+ "onDelete": "cascade",
840
+ "onUpdate": "no action"
841
+ },
842
+ "comments_userId_user_id_fk": {
843
+ "name": "comments_userId_user_id_fk",
844
+ "tableFrom": "comments",
845
+ "tableTo": "user",
846
+ "columnsFrom": [
847
+ "userId"
848
+ ],
849
+ "columnsTo": [
850
+ "id"
851
+ ],
852
+ "onDelete": "set null",
853
+ "onUpdate": "no action"
854
+ }
855
+ },
856
+ "compositePrimaryKeys": {},
857
+ "uniqueConstraints": {},
858
+ "policies": {},
859
+ "checkConstraints": {},
860
+ "isRLSEnabled": false
861
+ },
862
+ "public.duplicate_feedback": {
863
+ "name": "duplicate_feedback",
864
+ "schema": "",
865
+ "columns": {
866
+ "id": {
867
+ "name": "id",
868
+ "type": "serial",
869
+ "primaryKey": true,
870
+ "notNull": true
871
+ },
872
+ "originalFeedbackId": {
873
+ "name": "originalFeedbackId",
874
+ "type": "integer",
875
+ "primaryKey": false,
876
+ "notNull": true
877
+ },
878
+ "duplicateFeedbackId": {
879
+ "name": "duplicateFeedbackId",
880
+ "type": "integer",
881
+ "primaryKey": false,
882
+ "notNull": true
883
+ },
884
+ "similarity": {
885
+ "name": "similarity",
886
+ "type": "integer",
887
+ "primaryKey": false,
888
+ "notNull": true
889
+ },
890
+ "status": {
891
+ "name": "status",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": true,
895
+ "default": "'pending'"
896
+ },
897
+ "createdAt": {
898
+ "name": "createdAt",
899
+ "type": "timestamp",
900
+ "primaryKey": false,
901
+ "notNull": true,
902
+ "default": "now()"
903
+ },
904
+ "confirmedBy": {
905
+ "name": "confirmedBy",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": false
909
+ },
910
+ "confirmedAt": {
911
+ "name": "confirmedAt",
912
+ "type": "timestamp",
913
+ "primaryKey": false,
914
+ "notNull": false
915
+ }
916
+ },
917
+ "indexes": {
918
+ "idx_duplicate_original": {
919
+ "name": "idx_duplicate_original",
920
+ "columns": [
921
+ {
922
+ "expression": "originalFeedbackId",
923
+ "isExpression": false,
924
+ "asc": true,
925
+ "nulls": "last"
926
+ }
927
+ ],
928
+ "isUnique": false,
929
+ "concurrently": false,
930
+ "method": "btree",
931
+ "with": {}
932
+ },
933
+ "idx_duplicate_duplicate": {
934
+ "name": "idx_duplicate_duplicate",
935
+ "columns": [
936
+ {
937
+ "expression": "duplicateFeedbackId",
938
+ "isExpression": false,
939
+ "asc": true,
940
+ "nulls": "last"
941
+ }
942
+ ],
943
+ "isUnique": false,
944
+ "concurrently": false,
945
+ "method": "btree",
946
+ "with": {}
947
+ }
948
+ },
949
+ "foreignKeys": {
950
+ "duplicate_feedback_originalFeedbackId_feedback_feedbackId_fk": {
951
+ "name": "duplicate_feedback_originalFeedbackId_feedback_feedbackId_fk",
952
+ "tableFrom": "duplicate_feedback",
953
+ "tableTo": "feedback",
954
+ "columnsFrom": [
955
+ "originalFeedbackId"
956
+ ],
957
+ "columnsTo": [
958
+ "feedbackId"
959
+ ],
960
+ "onDelete": "cascade",
961
+ "onUpdate": "no action"
962
+ },
963
+ "duplicate_feedback_duplicateFeedbackId_feedback_feedbackId_fk": {
964
+ "name": "duplicate_feedback_duplicateFeedbackId_feedback_feedbackId_fk",
965
+ "tableFrom": "duplicate_feedback",
966
+ "tableTo": "feedback",
967
+ "columnsFrom": [
968
+ "duplicateFeedbackId"
969
+ ],
970
+ "columnsTo": [
971
+ "feedbackId"
972
+ ],
973
+ "onDelete": "cascade",
974
+ "onUpdate": "no action"
975
+ },
976
+ "duplicate_feedback_confirmedBy_user_id_fk": {
977
+ "name": "duplicate_feedback_confirmedBy_user_id_fk",
978
+ "tableFrom": "duplicate_feedback",
979
+ "tableTo": "user",
980
+ "columnsFrom": [
981
+ "confirmedBy"
982
+ ],
983
+ "columnsTo": [
984
+ "id"
985
+ ],
986
+ "onDelete": "set null",
987
+ "onUpdate": "no action"
988
+ }
989
+ },
990
+ "compositePrimaryKeys": {},
991
+ "uniqueConstraints": {
992
+ "unique_duplicate_pair": {
993
+ "name": "unique_duplicate_pair",
994
+ "nullsNotDistinct": false,
995
+ "columns": [
996
+ "originalFeedbackId",
997
+ "duplicateFeedbackId"
998
+ ]
999
+ }
1000
+ },
1001
+ "policies": {},
1002
+ "checkConstraints": {},
1003
+ "isRLSEnabled": false
1004
+ },
1005
+ "public.feedback": {
1006
+ "name": "feedback",
1007
+ "schema": "",
1008
+ "columns": {
1009
+ "feedbackId": {
1010
+ "name": "feedbackId",
1011
+ "type": "serial",
1012
+ "primaryKey": true,
1013
+ "notNull": true
1014
+ },
1015
+ "title": {
1016
+ "name": "title",
1017
+ "type": "text",
1018
+ "primaryKey": false,
1019
+ "notNull": true
1020
+ },
1021
+ "description": {
1022
+ "name": "description",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": true
1026
+ },
1027
+ "type": {
1028
+ "name": "type",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "priority": {
1034
+ "name": "priority",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true
1038
+ },
1039
+ "status": {
1040
+ "name": "status",
1041
+ "type": "text",
1042
+ "primaryKey": false,
1043
+ "notNull": true,
1044
+ "default": "'new'"
1045
+ },
1046
+ "organizationId": {
1047
+ "name": "organizationId",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": true
1051
+ },
1052
+ "submittedOnBehalf": {
1053
+ "name": "submittedOnBehalf",
1054
+ "type": "boolean",
1055
+ "primaryKey": false,
1056
+ "notNull": true,
1057
+ "default": false
1058
+ },
1059
+ "submittedBy": {
1060
+ "name": "submittedBy",
1061
+ "type": "text",
1062
+ "primaryKey": false,
1063
+ "notNull": false
1064
+ },
1065
+ "customerInfo": {
1066
+ "name": "customerInfo",
1067
+ "type": "jsonb",
1068
+ "primaryKey": false,
1069
+ "notNull": false
1070
+ },
1071
+ "createdAt": {
1072
+ "name": "createdAt",
1073
+ "type": "timestamp",
1074
+ "primaryKey": false,
1075
+ "notNull": true,
1076
+ "default": "now()"
1077
+ },
1078
+ "updatedAt": {
1079
+ "name": "updatedAt",
1080
+ "type": "timestamp",
1081
+ "primaryKey": false,
1082
+ "notNull": true,
1083
+ "default": "now()"
1084
+ },
1085
+ "deletedAt": {
1086
+ "name": "deletedAt",
1087
+ "type": "timestamp",
1088
+ "primaryKey": false,
1089
+ "notNull": false
1090
+ },
1091
+ "autoClassified": {
1092
+ "name": "autoClassified",
1093
+ "type": "boolean",
1094
+ "primaryKey": false,
1095
+ "notNull": true,
1096
+ "default": false
1097
+ },
1098
+ "processingStatus": {
1099
+ "name": "processingStatus",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": false,
1103
+ "default": "'pending'"
1104
+ },
1105
+ "processedAt": {
1106
+ "name": "processedAt",
1107
+ "type": "timestamp",
1108
+ "primaryKey": false,
1109
+ "notNull": false
1110
+ },
1111
+ "githubIssueId": {
1112
+ "name": "githubIssueId",
1113
+ "type": "integer",
1114
+ "primaryKey": false,
1115
+ "notNull": false
1116
+ },
1117
+ "githubIssueNumber": {
1118
+ "name": "githubIssueNumber",
1119
+ "type": "integer",
1120
+ "primaryKey": false,
1121
+ "notNull": false
1122
+ },
1123
+ "githubIssueUrl": {
1124
+ "name": "githubIssueUrl",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": false
1128
+ },
1129
+ "githubSyncedAt": {
1130
+ "name": "githubSyncedAt",
1131
+ "type": "timestamp",
1132
+ "primaryKey": false,
1133
+ "notNull": false
1134
+ },
1135
+ "githubStatus": {
1136
+ "name": "githubStatus",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": false
1140
+ }
1141
+ },
1142
+ "indexes": {
1143
+ "idx_feedback_orgId": {
1144
+ "name": "idx_feedback_orgId",
1145
+ "columns": [
1146
+ {
1147
+ "expression": "organizationId",
1148
+ "isExpression": false,
1149
+ "asc": true,
1150
+ "nulls": "last"
1151
+ }
1152
+ ],
1153
+ "isUnique": false,
1154
+ "concurrently": false,
1155
+ "method": "btree",
1156
+ "with": {}
1157
+ },
1158
+ "idx_feedback_status": {
1159
+ "name": "idx_feedback_status",
1160
+ "columns": [
1161
+ {
1162
+ "expression": "status",
1163
+ "isExpression": false,
1164
+ "asc": true,
1165
+ "nulls": "last"
1166
+ }
1167
+ ],
1168
+ "isUnique": false,
1169
+ "concurrently": false,
1170
+ "method": "btree",
1171
+ "with": {}
1172
+ },
1173
+ "idx_feedback_createdAt": {
1174
+ "name": "idx_feedback_createdAt",
1175
+ "columns": [
1176
+ {
1177
+ "expression": "createdAt",
1178
+ "isExpression": false,
1179
+ "asc": true,
1180
+ "nulls": "last"
1181
+ }
1182
+ ],
1183
+ "isUnique": false,
1184
+ "concurrently": false,
1185
+ "method": "btree",
1186
+ "with": {}
1187
+ },
1188
+ "idx_feedback_submittedBy": {
1189
+ "name": "idx_feedback_submittedBy",
1190
+ "columns": [
1191
+ {
1192
+ "expression": "submittedBy",
1193
+ "isExpression": false,
1194
+ "asc": true,
1195
+ "nulls": "last"
1196
+ }
1197
+ ],
1198
+ "isUnique": false,
1199
+ "concurrently": false,
1200
+ "method": "btree",
1201
+ "with": {}
1202
+ },
1203
+ "idx_feedback_deletedAt": {
1204
+ "name": "idx_feedback_deletedAt",
1205
+ "columns": [
1206
+ {
1207
+ "expression": "deletedAt",
1208
+ "isExpression": false,
1209
+ "asc": true,
1210
+ "nulls": "last"
1211
+ }
1212
+ ],
1213
+ "isUnique": false,
1214
+ "concurrently": false,
1215
+ "method": "btree",
1216
+ "with": {}
1217
+ },
1218
+ "idx_feedback_githubIssueId": {
1219
+ "name": "idx_feedback_githubIssueId",
1220
+ "columns": [
1221
+ {
1222
+ "expression": "githubIssueId",
1223
+ "isExpression": false,
1224
+ "asc": true,
1225
+ "nulls": "last"
1226
+ }
1227
+ ],
1228
+ "isUnique": false,
1229
+ "concurrently": false,
1230
+ "method": "btree",
1231
+ "with": {}
1232
+ }
1233
+ },
1234
+ "foreignKeys": {
1235
+ "feedback_submittedBy_user_id_fk": {
1236
+ "name": "feedback_submittedBy_user_id_fk",
1237
+ "tableFrom": "feedback",
1238
+ "tableTo": "user",
1239
+ "columnsFrom": [
1240
+ "submittedBy"
1241
+ ],
1242
+ "columnsTo": [
1243
+ "id"
1244
+ ],
1245
+ "onDelete": "set null",
1246
+ "onUpdate": "no action"
1247
+ }
1248
+ },
1249
+ "compositePrimaryKeys": {},
1250
+ "uniqueConstraints": {},
1251
+ "policies": {},
1252
+ "checkConstraints": {},
1253
+ "isRLSEnabled": false
1254
+ },
1255
+ "public.github_integrations": {
1256
+ "name": "github_integrations",
1257
+ "schema": "",
1258
+ "columns": {
1259
+ "id": {
1260
+ "name": "id",
1261
+ "type": "serial",
1262
+ "primaryKey": true,
1263
+ "notNull": true
1264
+ },
1265
+ "organizationId": {
1266
+ "name": "organizationId",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true
1270
+ },
1271
+ "accessToken": {
1272
+ "name": "accessToken",
1273
+ "type": "text",
1274
+ "primaryKey": false,
1275
+ "notNull": true
1276
+ },
1277
+ "owner": {
1278
+ "name": "owner",
1279
+ "type": "text",
1280
+ "primaryKey": false,
1281
+ "notNull": true
1282
+ },
1283
+ "repo": {
1284
+ "name": "repo",
1285
+ "type": "text",
1286
+ "primaryKey": false,
1287
+ "notNull": true
1288
+ },
1289
+ "labelMapping": {
1290
+ "name": "labelMapping",
1291
+ "type": "jsonb",
1292
+ "primaryKey": false,
1293
+ "notNull": false
1294
+ },
1295
+ "statusMapping": {
1296
+ "name": "statusMapping",
1297
+ "type": "jsonb",
1298
+ "primaryKey": false,
1299
+ "notNull": false
1300
+ },
1301
+ "autoSync": {
1302
+ "name": "autoSync",
1303
+ "type": "boolean",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "default": true
1307
+ },
1308
+ "webhookSecret": {
1309
+ "name": "webhookSecret",
1310
+ "type": "text",
1311
+ "primaryKey": false,
1312
+ "notNull": false
1313
+ },
1314
+ "createdAt": {
1315
+ "name": "createdAt",
1316
+ "type": "timestamp",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "default": "now()"
1320
+ },
1321
+ "updatedAt": {
1322
+ "name": "updatedAt",
1323
+ "type": "timestamp",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "default": "now()"
1327
+ }
1328
+ },
1329
+ "indexes": {
1330
+ "idx_github_integrations_orgId": {
1331
+ "name": "idx_github_integrations_orgId",
1332
+ "columns": [
1333
+ {
1334
+ "expression": "organizationId",
1335
+ "isExpression": false,
1336
+ "asc": true,
1337
+ "nulls": "last"
1338
+ }
1339
+ ],
1340
+ "isUnique": false,
1341
+ "concurrently": false,
1342
+ "method": "btree",
1343
+ "with": {}
1344
+ }
1345
+ },
1346
+ "foreignKeys": {
1347
+ "github_integrations_organizationId_organizations_id_fk": {
1348
+ "name": "github_integrations_organizationId_organizations_id_fk",
1349
+ "tableFrom": "github_integrations",
1350
+ "tableTo": "organizations",
1351
+ "columnsFrom": [
1352
+ "organizationId"
1353
+ ],
1354
+ "columnsTo": [
1355
+ "id"
1356
+ ],
1357
+ "onDelete": "cascade",
1358
+ "onUpdate": "no action"
1359
+ }
1360
+ },
1361
+ "compositePrimaryKeys": {},
1362
+ "uniqueConstraints": {},
1363
+ "policies": {},
1364
+ "checkConstraints": {},
1365
+ "isRLSEnabled": false
1366
+ },
1367
+ "public.organizations": {
1368
+ "name": "organizations",
1369
+ "schema": "",
1370
+ "columns": {
1371
+ "id": {
1372
+ "name": "id",
1373
+ "type": "text",
1374
+ "primaryKey": true,
1375
+ "notNull": true
1376
+ },
1377
+ "name": {
1378
+ "name": "name",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true
1382
+ },
1383
+ "slug": {
1384
+ "name": "slug",
1385
+ "type": "text",
1386
+ "primaryKey": false,
1387
+ "notNull": true
1388
+ },
1389
+ "description": {
1390
+ "name": "description",
1391
+ "type": "text",
1392
+ "primaryKey": false,
1393
+ "notNull": false
1394
+ },
1395
+ "created_at": {
1396
+ "name": "created_at",
1397
+ "type": "timestamp",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "default": "now()"
1401
+ },
1402
+ "updated_at": {
1403
+ "name": "updated_at",
1404
+ "type": "timestamp",
1405
+ "primaryKey": false,
1406
+ "notNull": true,
1407
+ "default": "now()"
1408
+ }
1409
+ },
1410
+ "indexes": {},
1411
+ "foreignKeys": {},
1412
+ "compositePrimaryKeys": {},
1413
+ "uniqueConstraints": {
1414
+ "organizations_slug_unique": {
1415
+ "name": "organizations_slug_unique",
1416
+ "nullsNotDistinct": false,
1417
+ "columns": [
1418
+ "slug"
1419
+ ]
1420
+ }
1421
+ },
1422
+ "policies": {},
1423
+ "checkConstraints": {},
1424
+ "isRLSEnabled": false
1425
+ },
1426
+ "public.organization_settings": {
1427
+ "name": "organization_settings",
1428
+ "schema": "",
1429
+ "columns": {
1430
+ "organizationId": {
1431
+ "name": "organizationId",
1432
+ "type": "text",
1433
+ "primaryKey": true,
1434
+ "notNull": true
1435
+ },
1436
+ "widgetConfig": {
1437
+ "name": "widgetConfig",
1438
+ "type": "jsonb",
1439
+ "primaryKey": false,
1440
+ "notNull": false
1441
+ },
1442
+ "portalConfig": {
1443
+ "name": "portalConfig",
1444
+ "type": "jsonb",
1445
+ "primaryKey": false,
1446
+ "notNull": false
1447
+ },
1448
+ "customDomain": {
1449
+ "name": "customDomain",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": false
1453
+ },
1454
+ "createdAt": {
1455
+ "name": "createdAt",
1456
+ "type": "timestamp",
1457
+ "primaryKey": false,
1458
+ "notNull": true,
1459
+ "default": "now()"
1460
+ },
1461
+ "updatedAt": {
1462
+ "name": "updatedAt",
1463
+ "type": "timestamp",
1464
+ "primaryKey": false,
1465
+ "notNull": true,
1466
+ "default": "now()"
1467
+ }
1468
+ },
1469
+ "indexes": {
1470
+ "idx_org_settings_orgId": {
1471
+ "name": "idx_org_settings_orgId",
1472
+ "columns": [
1473
+ {
1474
+ "expression": "organizationId",
1475
+ "isExpression": false,
1476
+ "asc": true,
1477
+ "nulls": "last"
1478
+ }
1479
+ ],
1480
+ "isUnique": false,
1481
+ "concurrently": false,
1482
+ "method": "btree",
1483
+ "with": {}
1484
+ }
1485
+ },
1486
+ "foreignKeys": {
1487
+ "organization_settings_organizationId_organizations_id_fk": {
1488
+ "name": "organization_settings_organizationId_organizations_id_fk",
1489
+ "tableFrom": "organization_settings",
1490
+ "tableTo": "organizations",
1491
+ "columnsFrom": [
1492
+ "organizationId"
1493
+ ],
1494
+ "columnsTo": [
1495
+ "id"
1496
+ ],
1497
+ "onDelete": "cascade",
1498
+ "onUpdate": "no action"
1499
+ }
1500
+ },
1501
+ "compositePrimaryKeys": {},
1502
+ "uniqueConstraints": {
1503
+ "unique_org_custom_domain": {
1504
+ "name": "unique_org_custom_domain",
1505
+ "nullsNotDistinct": false,
1506
+ "columns": [
1507
+ "customDomain"
1508
+ ]
1509
+ }
1510
+ },
1511
+ "policies": {},
1512
+ "checkConstraints": {},
1513
+ "isRLSEnabled": false
1514
+ },
1515
+ "public.organization_members": {
1516
+ "name": "organization_members",
1517
+ "schema": "",
1518
+ "columns": {
1519
+ "organization_id": {
1520
+ "name": "organization_id",
1521
+ "type": "text",
1522
+ "primaryKey": false,
1523
+ "notNull": true
1524
+ },
1525
+ "user_id": {
1526
+ "name": "user_id",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ },
1531
+ "role": {
1532
+ "name": "role",
1533
+ "type": "text",
1534
+ "primaryKey": false,
1535
+ "notNull": true
1536
+ },
1537
+ "created_at": {
1538
+ "name": "created_at",
1539
+ "type": "timestamp",
1540
+ "primaryKey": false,
1541
+ "notNull": true,
1542
+ "default": "now()"
1543
+ }
1544
+ },
1545
+ "indexes": {},
1546
+ "foreignKeys": {
1547
+ "organization_members_organization_id_organizations_id_fk": {
1548
+ "name": "organization_members_organization_id_organizations_id_fk",
1549
+ "tableFrom": "organization_members",
1550
+ "tableTo": "organizations",
1551
+ "columnsFrom": [
1552
+ "organization_id"
1553
+ ],
1554
+ "columnsTo": [
1555
+ "id"
1556
+ ],
1557
+ "onDelete": "cascade",
1558
+ "onUpdate": "no action"
1559
+ },
1560
+ "organization_members_user_id_user_id_fk": {
1561
+ "name": "organization_members_user_id_user_id_fk",
1562
+ "tableFrom": "organization_members",
1563
+ "tableTo": "user",
1564
+ "columnsFrom": [
1565
+ "user_id"
1566
+ ],
1567
+ "columnsTo": [
1568
+ "id"
1569
+ ],
1570
+ "onDelete": "cascade",
1571
+ "onUpdate": "no action"
1572
+ }
1573
+ },
1574
+ "compositePrimaryKeys": {
1575
+ "organization_members_organization_id_user_id_pk": {
1576
+ "name": "organization_members_organization_id_user_id_pk",
1577
+ "columns": [
1578
+ "organization_id",
1579
+ "user_id"
1580
+ ]
1581
+ }
1582
+ },
1583
+ "uniqueConstraints": {},
1584
+ "policies": {},
1585
+ "checkConstraints": {},
1586
+ "isRLSEnabled": false
1587
+ },
1588
+ "public.invitations": {
1589
+ "name": "invitations",
1590
+ "schema": "",
1591
+ "columns": {
1592
+ "id": {
1593
+ "name": "id",
1594
+ "type": "text",
1595
+ "primaryKey": true,
1596
+ "notNull": true
1597
+ },
1598
+ "organization_id": {
1599
+ "name": "organization_id",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": true
1603
+ },
1604
+ "email": {
1605
+ "name": "email",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true
1609
+ },
1610
+ "role": {
1611
+ "name": "role",
1612
+ "type": "text",
1613
+ "primaryKey": false,
1614
+ "notNull": true
1615
+ },
1616
+ "token": {
1617
+ "name": "token",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": true
1621
+ },
1622
+ "expires_at": {
1623
+ "name": "expires_at",
1624
+ "type": "timestamp",
1625
+ "primaryKey": false,
1626
+ "notNull": true
1627
+ },
1628
+ "accepted_at": {
1629
+ "name": "accepted_at",
1630
+ "type": "timestamp",
1631
+ "primaryKey": false,
1632
+ "notNull": false
1633
+ },
1634
+ "created_at": {
1635
+ "name": "created_at",
1636
+ "type": "timestamp",
1637
+ "primaryKey": false,
1638
+ "notNull": true,
1639
+ "default": "now()"
1640
+ }
1641
+ },
1642
+ "indexes": {},
1643
+ "foreignKeys": {
1644
+ "invitations_organization_id_organizations_id_fk": {
1645
+ "name": "invitations_organization_id_organizations_id_fk",
1646
+ "tableFrom": "invitations",
1647
+ "tableTo": "organizations",
1648
+ "columnsFrom": [
1649
+ "organization_id"
1650
+ ],
1651
+ "columnsTo": [
1652
+ "id"
1653
+ ],
1654
+ "onDelete": "cascade",
1655
+ "onUpdate": "no action"
1656
+ }
1657
+ },
1658
+ "compositePrimaryKeys": {},
1659
+ "uniqueConstraints": {
1660
+ "invitations_token_unique": {
1661
+ "name": "invitations_token_unique",
1662
+ "nullsNotDistinct": false,
1663
+ "columns": [
1664
+ "token"
1665
+ ]
1666
+ }
1667
+ },
1668
+ "policies": {},
1669
+ "checkConstraints": {},
1670
+ "isRLSEnabled": false
1671
+ },
1672
+ "public.votes": {
1673
+ "name": "votes",
1674
+ "schema": "",
1675
+ "columns": {
1676
+ "voteId": {
1677
+ "name": "voteId",
1678
+ "type": "serial",
1679
+ "primaryKey": true,
1680
+ "notNull": true
1681
+ },
1682
+ "feedbackId": {
1683
+ "name": "feedbackId",
1684
+ "type": "serial",
1685
+ "primaryKey": false,
1686
+ "notNull": true
1687
+ },
1688
+ "visitorId": {
1689
+ "name": "visitorId",
1690
+ "type": "text",
1691
+ "primaryKey": false,
1692
+ "notNull": false
1693
+ },
1694
+ "userId": {
1695
+ "name": "userId",
1696
+ "type": "text",
1697
+ "primaryKey": false,
1698
+ "notNull": false
1699
+ },
1700
+ "createdAt": {
1701
+ "name": "createdAt",
1702
+ "type": "timestamp",
1703
+ "primaryKey": false,
1704
+ "notNull": true,
1705
+ "default": "now()"
1706
+ }
1707
+ },
1708
+ "indexes": {
1709
+ "idx_votes_feedbackId": {
1710
+ "name": "idx_votes_feedbackId",
1711
+ "columns": [
1712
+ {
1713
+ "expression": "feedbackId",
1714
+ "isExpression": false,
1715
+ "asc": true,
1716
+ "nulls": "last"
1717
+ }
1718
+ ],
1719
+ "isUnique": false,
1720
+ "concurrently": false,
1721
+ "method": "btree",
1722
+ "with": {}
1723
+ },
1724
+ "idx_votes_userId": {
1725
+ "name": "idx_votes_userId",
1726
+ "columns": [
1727
+ {
1728
+ "expression": "userId",
1729
+ "isExpression": false,
1730
+ "asc": true,
1731
+ "nulls": "last"
1732
+ }
1733
+ ],
1734
+ "isUnique": false,
1735
+ "concurrently": false,
1736
+ "method": "btree",
1737
+ "with": {}
1738
+ }
1739
+ },
1740
+ "foreignKeys": {
1741
+ "votes_feedbackId_feedback_feedbackId_fk": {
1742
+ "name": "votes_feedbackId_feedback_feedbackId_fk",
1743
+ "tableFrom": "votes",
1744
+ "tableTo": "feedback",
1745
+ "columnsFrom": [
1746
+ "feedbackId"
1747
+ ],
1748
+ "columnsTo": [
1749
+ "feedbackId"
1750
+ ],
1751
+ "onDelete": "cascade",
1752
+ "onUpdate": "no action"
1753
+ },
1754
+ "votes_userId_user_id_fk": {
1755
+ "name": "votes_userId_user_id_fk",
1756
+ "tableFrom": "votes",
1757
+ "tableTo": "user",
1758
+ "columnsFrom": [
1759
+ "userId"
1760
+ ],
1761
+ "columnsTo": [
1762
+ "id"
1763
+ ],
1764
+ "onDelete": "set null",
1765
+ "onUpdate": "no action"
1766
+ }
1767
+ },
1768
+ "compositePrimaryKeys": {},
1769
+ "uniqueConstraints": {
1770
+ "unique_vote": {
1771
+ "name": "unique_vote",
1772
+ "nullsNotDistinct": false,
1773
+ "columns": [
1774
+ "feedbackId",
1775
+ "visitorId"
1776
+ ]
1777
+ }
1778
+ },
1779
+ "policies": {},
1780
+ "checkConstraints": {},
1781
+ "isRLSEnabled": false
1782
+ },
1783
+ "public.status_history": {
1784
+ "name": "status_history",
1785
+ "schema": "",
1786
+ "columns": {
1787
+ "historyId": {
1788
+ "name": "historyId",
1789
+ "type": "serial",
1790
+ "primaryKey": true,
1791
+ "notNull": true
1792
+ },
1793
+ "feedbackId": {
1794
+ "name": "feedbackId",
1795
+ "type": "integer",
1796
+ "primaryKey": false,
1797
+ "notNull": true
1798
+ },
1799
+ "oldStatus": {
1800
+ "name": "oldStatus",
1801
+ "type": "text",
1802
+ "primaryKey": false,
1803
+ "notNull": true
1804
+ },
1805
+ "newStatus": {
1806
+ "name": "newStatus",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": true
1810
+ },
1811
+ "changedBy": {
1812
+ "name": "changedBy",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": false
1816
+ },
1817
+ "changedAt": {
1818
+ "name": "changedAt",
1819
+ "type": "timestamp",
1820
+ "primaryKey": false,
1821
+ "notNull": true,
1822
+ "default": "now()"
1823
+ },
1824
+ "comment": {
1825
+ "name": "comment",
1826
+ "type": "text",
1827
+ "primaryKey": false,
1828
+ "notNull": false
1829
+ }
1830
+ },
1831
+ "indexes": {
1832
+ "idx_status_history_feedbackId": {
1833
+ "name": "idx_status_history_feedbackId",
1834
+ "columns": [
1835
+ {
1836
+ "expression": "feedbackId",
1837
+ "isExpression": false,
1838
+ "asc": true,
1839
+ "nulls": "last"
1840
+ }
1841
+ ],
1842
+ "isUnique": false,
1843
+ "concurrently": false,
1844
+ "method": "btree",
1845
+ "with": {}
1846
+ },
1847
+ "idx_status_history_changedAt": {
1848
+ "name": "idx_status_history_changedAt",
1849
+ "columns": [
1850
+ {
1851
+ "expression": "changedAt",
1852
+ "isExpression": false,
1853
+ "asc": true,
1854
+ "nulls": "last"
1855
+ }
1856
+ ],
1857
+ "isUnique": false,
1858
+ "concurrently": false,
1859
+ "method": "btree",
1860
+ "with": {}
1861
+ }
1862
+ },
1863
+ "foreignKeys": {
1864
+ "status_history_feedbackId_feedback_feedbackId_fk": {
1865
+ "name": "status_history_feedbackId_feedback_feedbackId_fk",
1866
+ "tableFrom": "status_history",
1867
+ "tableTo": "feedback",
1868
+ "columnsFrom": [
1869
+ "feedbackId"
1870
+ ],
1871
+ "columnsTo": [
1872
+ "feedbackId"
1873
+ ],
1874
+ "onDelete": "cascade",
1875
+ "onUpdate": "no action"
1876
+ },
1877
+ "status_history_changedBy_user_id_fk": {
1878
+ "name": "status_history_changedBy_user_id_fk",
1879
+ "tableFrom": "status_history",
1880
+ "tableTo": "user",
1881
+ "columnsFrom": [
1882
+ "changedBy"
1883
+ ],
1884
+ "columnsTo": [
1885
+ "id"
1886
+ ],
1887
+ "onDelete": "set null",
1888
+ "onUpdate": "no action"
1889
+ }
1890
+ },
1891
+ "compositePrimaryKeys": {},
1892
+ "uniqueConstraints": {},
1893
+ "policies": {},
1894
+ "checkConstraints": {},
1895
+ "isRLSEnabled": false
1896
+ },
1897
+ "public.notification_preferences": {
1898
+ "name": "notification_preferences",
1899
+ "schema": "",
1900
+ "columns": {
1901
+ "userId": {
1902
+ "name": "userId",
1903
+ "type": "text",
1904
+ "primaryKey": true,
1905
+ "notNull": true
1906
+ },
1907
+ "statusChange": {
1908
+ "name": "statusChange",
1909
+ "type": "boolean",
1910
+ "primaryKey": false,
1911
+ "notNull": true,
1912
+ "default": true
1913
+ },
1914
+ "newComment": {
1915
+ "name": "newComment",
1916
+ "type": "boolean",
1917
+ "primaryKey": false,
1918
+ "notNull": true,
1919
+ "default": true
1920
+ },
1921
+ "updatedAt": {
1922
+ "name": "updatedAt",
1923
+ "type": "timestamp",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "default": "now()"
1927
+ }
1928
+ },
1929
+ "indexes": {},
1930
+ "foreignKeys": {
1931
+ "notification_preferences_userId_user_id_fk": {
1932
+ "name": "notification_preferences_userId_user_id_fk",
1933
+ "tableFrom": "notification_preferences",
1934
+ "tableTo": "user",
1935
+ "columnsFrom": [
1936
+ "userId"
1937
+ ],
1938
+ "columnsTo": [
1939
+ "id"
1940
+ ],
1941
+ "onDelete": "cascade",
1942
+ "onUpdate": "no action"
1943
+ }
1944
+ },
1945
+ "compositePrimaryKeys": {},
1946
+ "uniqueConstraints": {},
1947
+ "policies": {},
1948
+ "checkConstraints": {},
1949
+ "isRLSEnabled": false
1950
+ },
1951
+ "public.notifications": {
1952
+ "name": "notifications",
1953
+ "schema": "",
1954
+ "columns": {
1955
+ "notificationId": {
1956
+ "name": "notificationId",
1957
+ "type": "serial",
1958
+ "primaryKey": true,
1959
+ "notNull": true
1960
+ },
1961
+ "userId": {
1962
+ "name": "userId",
1963
+ "type": "text",
1964
+ "primaryKey": false,
1965
+ "notNull": true
1966
+ },
1967
+ "type": {
1968
+ "name": "type",
1969
+ "type": "text",
1970
+ "primaryKey": false,
1971
+ "notNull": true
1972
+ },
1973
+ "feedbackId": {
1974
+ "name": "feedbackId",
1975
+ "type": "serial",
1976
+ "primaryKey": false,
1977
+ "notNull": true
1978
+ },
1979
+ "data": {
1980
+ "name": "data",
1981
+ "type": "jsonb",
1982
+ "primaryKey": false,
1983
+ "notNull": false
1984
+ },
1985
+ "status": {
1986
+ "name": "status",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": true,
1990
+ "default": "'pending'"
1991
+ },
1992
+ "sentAt": {
1993
+ "name": "sentAt",
1994
+ "type": "timestamp",
1995
+ "primaryKey": false,
1996
+ "notNull": false
1997
+ },
1998
+ "error": {
1999
+ "name": "error",
2000
+ "type": "text",
2001
+ "primaryKey": false,
2002
+ "notNull": false
2003
+ },
2004
+ "createdAt": {
2005
+ "name": "createdAt",
2006
+ "type": "timestamp",
2007
+ "primaryKey": false,
2008
+ "notNull": true,
2009
+ "default": "now()"
2010
+ }
2011
+ },
2012
+ "indexes": {
2013
+ "idx_notifications_userId": {
2014
+ "name": "idx_notifications_userId",
2015
+ "columns": [
2016
+ {
2017
+ "expression": "userId",
2018
+ "isExpression": false,
2019
+ "asc": true,
2020
+ "nulls": "last"
2021
+ }
2022
+ ],
2023
+ "isUnique": false,
2024
+ "concurrently": false,
2025
+ "method": "btree",
2026
+ "with": {}
2027
+ },
2028
+ "idx_notifications_status": {
2029
+ "name": "idx_notifications_status",
2030
+ "columns": [
2031
+ {
2032
+ "expression": "status",
2033
+ "isExpression": false,
2034
+ "asc": true,
2035
+ "nulls": "last"
2036
+ }
2037
+ ],
2038
+ "isUnique": false,
2039
+ "concurrently": false,
2040
+ "method": "btree",
2041
+ "with": {}
2042
+ },
2043
+ "idx_notifications_type": {
2044
+ "name": "idx_notifications_type",
2045
+ "columns": [
2046
+ {
2047
+ "expression": "type",
2048
+ "isExpression": false,
2049
+ "asc": true,
2050
+ "nulls": "last"
2051
+ }
2052
+ ],
2053
+ "isUnique": false,
2054
+ "concurrently": false,
2055
+ "method": "btree",
2056
+ "with": {}
2057
+ }
2058
+ },
2059
+ "foreignKeys": {
2060
+ "notifications_userId_user_id_fk": {
2061
+ "name": "notifications_userId_user_id_fk",
2062
+ "tableFrom": "notifications",
2063
+ "tableTo": "user",
2064
+ "columnsFrom": [
2065
+ "userId"
2066
+ ],
2067
+ "columnsTo": [
2068
+ "id"
2069
+ ],
2070
+ "onDelete": "cascade",
2071
+ "onUpdate": "no action"
2072
+ },
2073
+ "notifications_feedbackId_feedback_feedbackId_fk": {
2074
+ "name": "notifications_feedbackId_feedback_feedbackId_fk",
2075
+ "tableFrom": "notifications",
2076
+ "tableTo": "feedback",
2077
+ "columnsFrom": [
2078
+ "feedbackId"
2079
+ ],
2080
+ "columnsTo": [
2081
+ "feedbackId"
2082
+ ],
2083
+ "onDelete": "cascade",
2084
+ "onUpdate": "no action"
2085
+ }
2086
+ },
2087
+ "compositePrimaryKeys": {},
2088
+ "uniqueConstraints": {},
2089
+ "policies": {},
2090
+ "checkConstraints": {},
2091
+ "isRLSEnabled": false
2092
+ },
2093
+ "public.feedback_tags": {
2094
+ "name": "feedback_tags",
2095
+ "schema": "",
2096
+ "columns": {
2097
+ "id": {
2098
+ "name": "id",
2099
+ "type": "serial",
2100
+ "primaryKey": true,
2101
+ "notNull": true
2102
+ },
2103
+ "feedbackId": {
2104
+ "name": "feedbackId",
2105
+ "type": "integer",
2106
+ "primaryKey": false,
2107
+ "notNull": true
2108
+ },
2109
+ "tagId": {
2110
+ "name": "tagId",
2111
+ "type": "integer",
2112
+ "primaryKey": false,
2113
+ "notNull": true
2114
+ },
2115
+ "createdAt": {
2116
+ "name": "createdAt",
2117
+ "type": "timestamp",
2118
+ "primaryKey": false,
2119
+ "notNull": true,
2120
+ "default": "now()"
2121
+ }
2122
+ },
2123
+ "indexes": {
2124
+ "idx_feedback_tags_feedbackId": {
2125
+ "name": "idx_feedback_tags_feedbackId",
2126
+ "columns": [
2127
+ {
2128
+ "expression": "feedbackId",
2129
+ "isExpression": false,
2130
+ "asc": true,
2131
+ "nulls": "last"
2132
+ }
2133
+ ],
2134
+ "isUnique": false,
2135
+ "concurrently": false,
2136
+ "method": "btree",
2137
+ "with": {}
2138
+ },
2139
+ "idx_feedback_tags_tagId": {
2140
+ "name": "idx_feedback_tags_tagId",
2141
+ "columns": [
2142
+ {
2143
+ "expression": "tagId",
2144
+ "isExpression": false,
2145
+ "asc": true,
2146
+ "nulls": "last"
2147
+ }
2148
+ ],
2149
+ "isUnique": false,
2150
+ "concurrently": false,
2151
+ "method": "btree",
2152
+ "with": {}
2153
+ },
2154
+ "idx_feedback_tags_unique": {
2155
+ "name": "idx_feedback_tags_unique",
2156
+ "columns": [
2157
+ {
2158
+ "expression": "feedbackId",
2159
+ "isExpression": false,
2160
+ "asc": true,
2161
+ "nulls": "last"
2162
+ },
2163
+ {
2164
+ "expression": "tagId",
2165
+ "isExpression": false,
2166
+ "asc": true,
2167
+ "nulls": "last"
2168
+ }
2169
+ ],
2170
+ "isUnique": false,
2171
+ "concurrently": false,
2172
+ "method": "btree",
2173
+ "with": {}
2174
+ }
2175
+ },
2176
+ "foreignKeys": {
2177
+ "feedback_tags_feedbackId_feedback_feedbackId_fk": {
2178
+ "name": "feedback_tags_feedbackId_feedback_feedbackId_fk",
2179
+ "tableFrom": "feedback_tags",
2180
+ "tableTo": "feedback",
2181
+ "columnsFrom": [
2182
+ "feedbackId"
2183
+ ],
2184
+ "columnsTo": [
2185
+ "feedbackId"
2186
+ ],
2187
+ "onDelete": "cascade",
2188
+ "onUpdate": "no action"
2189
+ },
2190
+ "feedback_tags_tagId_tags_tagId_fk": {
2191
+ "name": "feedback_tags_tagId_tags_tagId_fk",
2192
+ "tableFrom": "feedback_tags",
2193
+ "tableTo": "tags",
2194
+ "columnsFrom": [
2195
+ "tagId"
2196
+ ],
2197
+ "columnsTo": [
2198
+ "tagId"
2199
+ ],
2200
+ "onDelete": "cascade",
2201
+ "onUpdate": "no action"
2202
+ }
2203
+ },
2204
+ "compositePrimaryKeys": {},
2205
+ "uniqueConstraints": {},
2206
+ "policies": {},
2207
+ "checkConstraints": {},
2208
+ "isRLSEnabled": false
2209
+ },
2210
+ "public.tags": {
2211
+ "name": "tags",
2212
+ "schema": "",
2213
+ "columns": {
2214
+ "tagId": {
2215
+ "name": "tagId",
2216
+ "type": "serial",
2217
+ "primaryKey": true,
2218
+ "notNull": true
2219
+ },
2220
+ "name": {
2221
+ "name": "name",
2222
+ "type": "text",
2223
+ "primaryKey": false,
2224
+ "notNull": true
2225
+ },
2226
+ "slug": {
2227
+ "name": "slug",
2228
+ "type": "text",
2229
+ "primaryKey": false,
2230
+ "notNull": true
2231
+ },
2232
+ "color": {
2233
+ "name": "color",
2234
+ "type": "text",
2235
+ "primaryKey": false,
2236
+ "notNull": false,
2237
+ "default": "'#3b82f6'"
2238
+ },
2239
+ "description": {
2240
+ "name": "description",
2241
+ "type": "text",
2242
+ "primaryKey": false,
2243
+ "notNull": false
2244
+ },
2245
+ "createdAt": {
2246
+ "name": "createdAt",
2247
+ "type": "timestamp",
2248
+ "primaryKey": false,
2249
+ "notNull": true,
2250
+ "default": "now()"
2251
+ }
2252
+ },
2253
+ "indexes": {},
2254
+ "foreignKeys": {},
2255
+ "compositePrimaryKeys": {},
2256
+ "uniqueConstraints": {
2257
+ "tags_name_unique": {
2258
+ "name": "tags_name_unique",
2259
+ "nullsNotDistinct": false,
2260
+ "columns": [
2261
+ "name"
2262
+ ]
2263
+ },
2264
+ "tags_slug_unique": {
2265
+ "name": "tags_slug_unique",
2266
+ "nullsNotDistinct": false,
2267
+ "columns": [
2268
+ "slug"
2269
+ ]
2270
+ }
2271
+ },
2272
+ "policies": {},
2273
+ "checkConstraints": {},
2274
+ "isRLSEnabled": false
2275
+ },
2276
+ "public.webhook_events": {
2277
+ "name": "webhook_events",
2278
+ "schema": "",
2279
+ "columns": {
2280
+ "eventId": {
2281
+ "name": "eventId",
2282
+ "type": "serial",
2283
+ "primaryKey": true,
2284
+ "notNull": true
2285
+ },
2286
+ "webhookId": {
2287
+ "name": "webhookId",
2288
+ "type": "integer",
2289
+ "primaryKey": false,
2290
+ "notNull": true
2291
+ },
2292
+ "eventType": {
2293
+ "name": "eventType",
2294
+ "type": "text",
2295
+ "primaryKey": false,
2296
+ "notNull": true
2297
+ },
2298
+ "payload": {
2299
+ "name": "payload",
2300
+ "type": "jsonb",
2301
+ "primaryKey": false,
2302
+ "notNull": true
2303
+ },
2304
+ "status": {
2305
+ "name": "status",
2306
+ "type": "text",
2307
+ "primaryKey": false,
2308
+ "notNull": true,
2309
+ "default": "'pending'"
2310
+ },
2311
+ "responseStatus": {
2312
+ "name": "responseStatus",
2313
+ "type": "integer",
2314
+ "primaryKey": false,
2315
+ "notNull": false
2316
+ },
2317
+ "responseBody": {
2318
+ "name": "responseBody",
2319
+ "type": "text",
2320
+ "primaryKey": false,
2321
+ "notNull": false
2322
+ },
2323
+ "retryCount": {
2324
+ "name": "retryCount",
2325
+ "type": "integer",
2326
+ "primaryKey": false,
2327
+ "notNull": true,
2328
+ "default": 0
2329
+ },
2330
+ "maxRetries": {
2331
+ "name": "maxRetries",
2332
+ "type": "integer",
2333
+ "primaryKey": false,
2334
+ "notNull": true,
2335
+ "default": 3
2336
+ },
2337
+ "nextRetryAt": {
2338
+ "name": "nextRetryAt",
2339
+ "type": "timestamp",
2340
+ "primaryKey": false,
2341
+ "notNull": false
2342
+ },
2343
+ "deliveredAt": {
2344
+ "name": "deliveredAt",
2345
+ "type": "timestamp",
2346
+ "primaryKey": false,
2347
+ "notNull": false
2348
+ },
2349
+ "createdAt": {
2350
+ "name": "createdAt",
2351
+ "type": "timestamp",
2352
+ "primaryKey": false,
2353
+ "notNull": true,
2354
+ "default": "now()"
2355
+ },
2356
+ "updatedAt": {
2357
+ "name": "updatedAt",
2358
+ "type": "timestamp",
2359
+ "primaryKey": false,
2360
+ "notNull": true,
2361
+ "default": "now()"
2362
+ }
2363
+ },
2364
+ "indexes": {
2365
+ "idx_webhook_events_webhookId": {
2366
+ "name": "idx_webhook_events_webhookId",
2367
+ "columns": [
2368
+ {
2369
+ "expression": "webhookId",
2370
+ "isExpression": false,
2371
+ "asc": true,
2372
+ "nulls": "last"
2373
+ }
2374
+ ],
2375
+ "isUnique": false,
2376
+ "concurrently": false,
2377
+ "method": "btree",
2378
+ "with": {}
2379
+ },
2380
+ "idx_webhook_events_status": {
2381
+ "name": "idx_webhook_events_status",
2382
+ "columns": [
2383
+ {
2384
+ "expression": "status",
2385
+ "isExpression": false,
2386
+ "asc": true,
2387
+ "nulls": "last"
2388
+ }
2389
+ ],
2390
+ "isUnique": false,
2391
+ "concurrently": false,
2392
+ "method": "btree",
2393
+ "with": {}
2394
+ },
2395
+ "idx_webhook_events_nextRetry": {
2396
+ "name": "idx_webhook_events_nextRetry",
2397
+ "columns": [
2398
+ {
2399
+ "expression": "nextRetryAt",
2400
+ "isExpression": false,
2401
+ "asc": true,
2402
+ "nulls": "last"
2403
+ }
2404
+ ],
2405
+ "isUnique": false,
2406
+ "concurrently": false,
2407
+ "method": "btree",
2408
+ "with": {}
2409
+ }
2410
+ },
2411
+ "foreignKeys": {
2412
+ "webhook_events_webhookId_webhooks_webhookId_fk": {
2413
+ "name": "webhook_events_webhookId_webhooks_webhookId_fk",
2414
+ "tableFrom": "webhook_events",
2415
+ "tableTo": "webhooks",
2416
+ "columnsFrom": [
2417
+ "webhookId"
2418
+ ],
2419
+ "columnsTo": [
2420
+ "webhookId"
2421
+ ],
2422
+ "onDelete": "cascade",
2423
+ "onUpdate": "no action"
2424
+ }
2425
+ },
2426
+ "compositePrimaryKeys": {},
2427
+ "uniqueConstraints": {},
2428
+ "policies": {},
2429
+ "checkConstraints": {},
2430
+ "isRLSEnabled": false
2431
+ },
2432
+ "public.webhooks": {
2433
+ "name": "webhooks",
2434
+ "schema": "",
2435
+ "columns": {
2436
+ "webhookId": {
2437
+ "name": "webhookId",
2438
+ "type": "serial",
2439
+ "primaryKey": true,
2440
+ "notNull": true
2441
+ },
2442
+ "organizationId": {
2443
+ "name": "organizationId",
2444
+ "type": "text",
2445
+ "primaryKey": false,
2446
+ "notNull": true
2447
+ },
2448
+ "name": {
2449
+ "name": "name",
2450
+ "type": "text",
2451
+ "primaryKey": false,
2452
+ "notNull": true
2453
+ },
2454
+ "url": {
2455
+ "name": "url",
2456
+ "type": "text",
2457
+ "primaryKey": false,
2458
+ "notNull": true
2459
+ },
2460
+ "secret": {
2461
+ "name": "secret",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": false
2465
+ },
2466
+ "events": {
2467
+ "name": "events",
2468
+ "type": "jsonb",
2469
+ "primaryKey": false,
2470
+ "notNull": true
2471
+ },
2472
+ "enabled": {
2473
+ "name": "enabled",
2474
+ "type": "boolean",
2475
+ "primaryKey": false,
2476
+ "notNull": true,
2477
+ "default": true
2478
+ },
2479
+ "createdAt": {
2480
+ "name": "createdAt",
2481
+ "type": "timestamp",
2482
+ "primaryKey": false,
2483
+ "notNull": true,
2484
+ "default": "now()"
2485
+ },
2486
+ "updatedAt": {
2487
+ "name": "updatedAt",
2488
+ "type": "timestamp",
2489
+ "primaryKey": false,
2490
+ "notNull": true,
2491
+ "default": "now()"
2492
+ }
2493
+ },
2494
+ "indexes": {
2495
+ "idx_webhooks_orgId": {
2496
+ "name": "idx_webhooks_orgId",
2497
+ "columns": [
2498
+ {
2499
+ "expression": "organizationId",
2500
+ "isExpression": false,
2501
+ "asc": true,
2502
+ "nulls": "last"
2503
+ }
2504
+ ],
2505
+ "isUnique": false,
2506
+ "concurrently": false,
2507
+ "method": "btree",
2508
+ "with": {}
2509
+ },
2510
+ "idx_webhooks_enabled": {
2511
+ "name": "idx_webhooks_enabled",
2512
+ "columns": [
2513
+ {
2514
+ "expression": "enabled",
2515
+ "isExpression": false,
2516
+ "asc": true,
2517
+ "nulls": "last"
2518
+ }
2519
+ ],
2520
+ "isUnique": false,
2521
+ "concurrently": false,
2522
+ "method": "btree",
2523
+ "with": {}
2524
+ }
2525
+ },
2526
+ "foreignKeys": {
2527
+ "webhooks_organizationId_organizations_id_fk": {
2528
+ "name": "webhooks_organizationId_organizations_id_fk",
2529
+ "tableFrom": "webhooks",
2530
+ "tableTo": "organizations",
2531
+ "columnsFrom": [
2532
+ "organizationId"
2533
+ ],
2534
+ "columnsTo": [
2535
+ "id"
2536
+ ],
2537
+ "onDelete": "cascade",
2538
+ "onUpdate": "no action"
2539
+ }
2540
+ },
2541
+ "compositePrimaryKeys": {},
2542
+ "uniqueConstraints": {},
2543
+ "policies": {},
2544
+ "checkConstraints": {},
2545
+ "isRLSEnabled": false
361
2546
  }
362
2547
  },
363
2548
  "enums": {},