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