laranex-schema-viewer-ui 0.2.0 → 0.3.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 (269) hide show
  1. package/NOTICE +11 -0
  2. package/README.md +15 -2
  3. package/contract/check.mjs +7 -3
  4. package/contract/conformance/comparison/column-fields-same-driver.json +387 -0
  5. package/contract/conformance/comparison/combined-declared-only.json +275 -0
  6. package/contract/conformance/comparison/constraints.json +356 -0
  7. package/contract/conformance/comparison/cross-driver-types.json +453 -0
  8. package/contract/conformance/comparison/foreign-key-matching.json +615 -0
  9. package/contract/conformance/comparison/incomplete-coverage.json +214 -0
  10. package/contract/conformance/comparison/incomplete-limit.json +249 -0
  11. package/contract/conformance/comparison/index-matching.json +588 -0
  12. package/contract/conformance/comparison/primary-key.json +443 -0
  13. package/contract/conformance/comparison/referential-actions-mysql.json +321 -0
  14. package/contract/conformance/comparison/severity-overrides.json +283 -0
  15. package/contract/conformance/comparison/tables-missing-extra.json +306 -0
  16. package/contract/conformance/comparison/tenant-schemas-equal.json +329 -0
  17. package/contract/conformance/comparison/unnamed-duplicates.json +268 -0
  18. package/contract/conformance/comparison-diagnostics/both-sides-and-omitted.json +330 -0
  19. package/contract/conformance/comparison-diagnostics/complete.json +390 -0
  20. package/contract/conformance/comparison-diagnostics/coverage.json +405 -0
  21. package/contract/conformance/comparison-diagnostics/limit-zero.json +335 -0
  22. package/contract/conformance/comparison-diagnostics/omitted.json +370 -0
  23. package/contract/conformance/comparison-diagnostics/tenant-schema-label.json +162 -0
  24. package/contract/conformance/coverage-gaps/combined-document.json +71 -0
  25. package/contract/conformance/coverage-gaps/complete.json +53 -0
  26. package/contract/conformance/coverage-gaps/coverage-unknown.json +33 -0
  27. package/contract/conformance/coverage-gaps/declared-document.json +56 -0
  28. package/contract/conformance/coverage-gaps/default-schema-not-read.json +57 -0
  29. package/contract/conformance/coverage-gaps/default-schema-unknown.json +52 -0
  30. package/contract/conformance/coverage-gaps/feature-states.json +65 -0
  31. package/contract/conformance/coverage-gaps/features-then-schema.json +67 -0
  32. package/contract/conformance/coverage-gaps/not-applicable.json +50 -0
  33. package/contract/conformance/coverage-gaps/schema-not-read.json +58 -0
  34. package/contract/conformance/coverage-gaps/schemas-unknown.json +50 -0
  35. package/contract/conformance/gate/comparison-drift.json +346 -0
  36. package/contract/conformance/gate/diagnostics-only.json +257 -0
  37. package/contract/conformance/gate/extraction-warning-only.json +176 -0
  38. package/contract/conformance/gate/failed-inspection.json +183 -0
  39. package/contract/conformance/gate/incomplete-comparison.json +310 -0
  40. package/contract/conformance/gate/incomplete-coverage.json +355 -0
  41. package/contract/conformance/gate/incomplete-required-coverage.json +233 -0
  42. package/contract/conformance/gate/invalid-document.json +52 -0
  43. package/contract/conformance/gate/migration-only.json +650 -0
  44. package/contract/conformance/gate/migration-unknown.json +315 -0
  45. package/contract/conformance/gate/newer-minor.json +352 -0
  46. package/contract/conformance/gate/not-a-document.json +37 -0
  47. package/contract/conformance/gate/partial-coverage.json +242 -0
  48. package/contract/conformance/gate/precedence.json +431 -0
  49. package/contract/conformance/gate/requested-missing.json +417 -0
  50. package/contract/conformance/gate/requested-none.json +245 -0
  51. package/contract/conformance/gate/requested-wildcard-empty.json +189 -0
  52. package/contract/conformance/gate/requested-wildcard.json +387 -0
  53. package/contract/conformance/gate/threshold-below-severity.json +312 -0
  54. package/contract/conformance/gate/threshold-likely-at-certainty.json +312 -0
  55. package/contract/conformance/gate/threshold-likely-below-certainty.json +312 -0
  56. package/contract/conformance/gate/unsupported-version.json +269 -0
  57. package/contract/conformance/gate/zero-comparisons.json +242 -0
  58. package/contract/conformance/graph/composite-unordered-pairs.json +1 -1
  59. package/contract/conformance/graph/cross-connection-foreign-key.json +1 -1
  60. package/contract/conformance/graph/cross-connection-relationship.json +1 -1
  61. package/contract/conformance/graph/duplicate-foreign-keys.json +1 -1
  62. package/contract/conformance/graph/duplicate-table-names.json +1 -1
  63. package/contract/conformance/graph/foreign-key-and-relationships.json +1 -1
  64. package/contract/conformance/graph/foreign-key-only.json +1 -1
  65. package/contract/conformance/graph/link-note.json +1 -1
  66. package/contract/conformance/graph/multiple-between-tables.json +1 -1
  67. package/contract/conformance/graph/pivot.json +1 -1
  68. package/contract/conformance/graph/polymorphic.json +1 -1
  69. package/contract/conformance/graph/relationship-only.json +1 -1
  70. package/contract/conformance/graph/self-reference.json +1 -1
  71. package/contract/conformance/graph/through.json +1 -1
  72. package/contract/conformance/graph/unresolved-endpoint.json +1 -1
  73. package/contract/conformance/inference/association-table-without-key.json +283 -0
  74. package/contract/conformance/inference/association-table.json +314 -0
  75. package/contract/conformance/inference/composite-foreign-key.json +295 -0
  76. package/contract/conformance/inference/covered-by-relationship.json +224 -0
  77. package/contract/conformance/inference/many-to-one.json +223 -0
  78. package/contract/conformance/inference/multiple-foreign-keys.json +318 -0
  79. package/contract/conformance/inference/multiple-models.json +241 -0
  80. package/contract/conformance/inference/one-to-one-unique-constraint.json +241 -0
  81. package/contract/conformance/inference/one-to-one-unique-index.json +423 -0
  82. package/contract/conformance/inference/self-reference.json +169 -0
  83. package/contract/conformance/inference/unconfirmed-foreign-key.json +223 -0
  84. package/contract/conformance/inference/unmapped-tables.json +273 -0
  85. package/contract/conformance/migrations/behind.json +64 -0
  86. package/contract/conformance/migrations/diverged.json +62 -0
  87. package/contract/conformance/migrations/history-unavailable.json +15 -0
  88. package/contract/conformance/migrations/merge-behind.json +80 -0
  89. package/contract/conformance/migrations/missing-parent-recorded.json +55 -0
  90. package/contract/conformance/migrations/multiple-heads-behind.json +68 -0
  91. package/contract/conformance/migrations/multiple-heads-up-to-date.json +67 -0
  92. package/contract/conformance/migrations/partial-history-behind.json +55 -0
  93. package/contract/conformance/migrations/partial-history-missing-pending.json +69 -0
  94. package/contract/conformance/migrations/uninitialized-without-history.json +13 -0
  95. package/contract/conformance/migrations/uninitialized.json +63 -0
  96. package/contract/conformance/migrations/unknown-revision.json +64 -0
  97. package/contract/conformance/migrations/up-to-date.json +61 -0
  98. package/contract/conformance/migrations/version-table-unreadable.json +59 -0
  99. package/contract/conformance/overrides/empty.json +9 -0
  100. package/contract/conformance/overrides/every-field.json +262 -0
  101. package/contract/conformance/overrides/field-of-another-type.json +32 -0
  102. package/contract/conformance/overrides/field-on-missing-or-extra.json +25 -0
  103. package/contract/conformance/overrides/malformed.json +37 -0
  104. package/contract/conformance/overrides/not-an-array.json +15 -0
  105. package/contract/conformance/overrides/repeated.json +41 -0
  106. package/contract/conformance/overrides/unknown-field.json +18 -0
  107. package/contract/conformance/overrides/unknown-values.json +32 -0
  108. package/contract/conformance/requests/duplicates.json +271 -0
  109. package/contract/conformance/requests/explicit-over-wildcard.json +212 -0
  110. package/contract/conformance/requests/explicit-pairs.json +192 -0
  111. package/contract/conformance/requests/no-requests.json +130 -0
  112. package/contract/conformance/requests/ordering.json +271 -0
  113. package/contract/conformance/requests/unknown-connection.json +218 -0
  114. package/contract/conformance/requests/wildcard-baseline-is-a-name.json +162 -0
  115. package/contract/conformance/requests/wildcard-declared-coverage.json +82 -0
  116. package/contract/conformance/requests/wildcard-default-schema.json +202 -0
  117. package/contract/conformance/requests/wildcard-no-match.json +180 -0
  118. package/contract/conformance/requests/wildcard-no-schemas.json +180 -0
  119. package/contract/conformance/requests/wildcard-other-connection.json +222 -0
  120. package/contract/conformance/requests/wildcard-tenants.json +202 -0
  121. package/contract/conformance/store/add-to-empty.json +596 -0
  122. package/contract/conformance/store/complete-drops-diagnostic.json +516 -0
  123. package/contract/conformance/store/idempotent.json +701 -0
  124. package/contract/conformance/store/replace.json +639 -0
  125. package/contract/fixtures/gate/invalid/checked-comparisons-unsorted.json +265 -0
  126. package/contract/fixtures/gate/invalid/comparison-finding-kind.json +264 -0
  127. package/contract/fixtures/gate/invalid/counts-mismatch.json +264 -0
  128. package/contract/fixtures/gate/invalid/exit-code-out-of-range.json +84 -0
  129. package/contract/fixtures/gate/invalid/finding-wrong-id.json +264 -0
  130. package/contract/fixtures/gate/invalid/findings-unsorted.json +264 -0
  131. package/contract/fixtures/gate/invalid/incomplete-reported-as-drift.json +84 -0
  132. package/contract/fixtures/gate/invalid/invalid-document-with-findings.json +34 -0
  133. package/contract/fixtures/gate/invalid/migration-finding-severity.json +264 -0
  134. package/contract/fixtures/gate/invalid/passed-flag-mismatch.json +264 -0
  135. package/contract/fixtures/gate/invalid/passed-with-qualifying-findings.json +264 -0
  136. package/contract/fixtures/gate/invalid/requested-unsorted.json +285 -0
  137. package/contract/fixtures/gate/invalid/unknown-error-kind.json +84 -0
  138. package/contract/fixtures/gate/valid/drift.json +258 -0
  139. package/contract/fixtures/gate/valid/incomplete.json +78 -0
  140. package/contract/fixtures/gate/valid/invalid.json +26 -0
  141. package/contract/fixtures/gate/valid/migrations.json +102 -0
  142. package/contract/fixtures/gate/valid/passed.json +58 -0
  143. package/contract/fixtures/gate/valid/requested.json +269 -0
  144. package/contract/fixtures/invalid/backs-check-constraint.json +5 -53
  145. package/contract/fixtures/invalid/column-subject-without-columns.json +642 -0
  146. package/contract/fixtures/invalid/comparison-omitted-but-complete.json +2232 -0
  147. package/contract/fixtures/invalid/comparison-same-scope.json +2749 -0
  148. package/contract/fixtures/invalid/comparison-summary-mismatch.json +2749 -0
  149. package/contract/fixtures/invalid/comparison-unknown-connection.json +2749 -0
  150. package/contract/fixtures/invalid/comparison-wrong-id.json +2749 -0
  151. package/contract/fixtures/invalid/coverage-claims-complete.json +12 -17
  152. package/contract/fixtures/invalid/coverage-for-wrong-source.json +4 -32
  153. package/contract/fixtures/invalid/diagnostic-unknown-subject.json +12 -17
  154. package/contract/fixtures/invalid/diagnostic-wrong-id.json +644 -0
  155. package/contract/fixtures/invalid/difference-changed-without-fields.json +2743 -0
  156. package/contract/fixtures/invalid/difference-key-names-schema.json +2749 -0
  157. package/contract/fixtures/invalid/difference-key-unknown-column.json +2749 -0
  158. package/contract/fixtures/invalid/difference-missing-with-target.json +2753 -0
  159. package/contract/fixtures/invalid/difference-side-outside-scope.json +2749 -0
  160. package/contract/fixtures/invalid/difference-side-wrong-entity.json +2749 -0
  161. package/contract/fixtures/invalid/difference-wrong-id.json +2749 -0
  162. package/contract/fixtures/invalid/differences-unsorted.json +2749 -0
  163. package/contract/fixtures/invalid/drift-without-both-sources.json +12 -17
  164. package/contract/fixtures/invalid/{index-columns-out-of-order.json → driver-alias.json} +6 -54
  165. package/contract/fixtures/invalid/duplicate-ids.json +5 -29
  166. package/contract/fixtures/invalid/foreign-key-across-connections.json +8 -26
  167. package/contract/fixtures/invalid/foreign-key-column-counts.json +5 -11
  168. package/contract/fixtures/invalid/foreign-key-unknown-target.json +5 -53
  169. package/contract/fixtures/invalid/index-part-column-and-expression.json +5 -53
  170. package/contract/fixtures/invalid/inferred-covered-foreign-key.json +2176 -0
  171. package/contract/fixtures/invalid/inferred-kind-mismatch.json +2191 -0
  172. package/contract/fixtures/invalid/inferred-model-not-mapping-table.json +2191 -0
  173. package/contract/fixtures/invalid/inferred-unknown-foreign-key.json +2191 -0
  174. package/contract/fixtures/invalid/inferred-wrong-id.json +2191 -0
  175. package/contract/fixtures/invalid/inferred-wrong-links.json +2191 -0
  176. package/contract/fixtures/invalid/link-state-mismatch.json +44 -97
  177. package/contract/fixtures/invalid/migration-coverage-wrong-table.json +1699 -0
  178. package/contract/fixtures/invalid/migration-revisions-without-version-table.json +1699 -0
  179. package/contract/fixtures/invalid/migration-unknown-coverage-certain.json +1699 -0
  180. package/contract/fixtures/invalid/migration-unlisted-unknown-revision.json +1697 -0
  181. package/contract/fixtures/invalid/migration-version-table-outside-scope.json +1699 -0
  182. package/contract/fixtures/invalid/migration-wrong-heads.json +1698 -0
  183. package/contract/fixtures/invalid/migration-wrong-id.json +1699 -0
  184. package/contract/fixtures/invalid/migration-wrong-missing.json +1697 -0
  185. package/contract/fixtures/invalid/migration-wrong-status.json +1695 -0
  186. package/contract/fixtures/invalid/missing-field.json +5 -15
  187. package/contract/fixtures/invalid/pivot-unknown-column.json +44 -97
  188. package/contract/fixtures/invalid/predicate-without-partial.json +5 -15
  189. package/contract/fixtures/invalid/primary-index-not-unique.json +6 -54
  190. package/contract/fixtures/invalid/primary-index-other-columns.json +811 -0
  191. package/contract/fixtures/invalid/provenance-outside-source.json +5 -15
  192. package/contract/fixtures/invalid/related-model-missing.json +12 -17
  193. package/contract/fixtures/invalid/strict-other-minor.json +301 -0
  194. package/contract/fixtures/invalid/unknown-property-strict.json +6 -16
  195. package/contract/fixtures/invalid/unsupported-major.json +7 -17
  196. package/contract/fixtures/invalid/wrong-format.json +5 -15
  197. package/contract/fixtures/valid/combined-drift.json +12 -17
  198. package/contract/fixtures/valid/combined-eloquent.json +44 -97
  199. package/contract/fixtures/valid/combined-multi-connection.json +8 -26
  200. package/contract/fixtures/valid/comparison-incomplete.json +2225 -0
  201. package/contract/fixtures/valid/comparison-multi-connection.json +889 -0
  202. package/contract/fixtures/valid/comparison-schema-named-tables.json +381 -0
  203. package/contract/fixtures/valid/comparison-tenant-schemas.json +2742 -0
  204. package/contract/fixtures/valid/database-mysql-indexes.json +4 -32
  205. package/contract/fixtures/valid/database-postgresql-indexes.json +5 -53
  206. package/contract/fixtures/valid/database-sqlite-indexes.json +5 -15
  207. package/contract/fixtures/valid/declared-multi-connection.json +4 -1
  208. package/contract/fixtures/valid/declared-sqlalchemy.json +5 -11
  209. package/contract/fixtures/valid/inferred-associations.json +2184 -0
  210. package/contract/fixtures/valid/migrations-alembic.json +1692 -0
  211. package/contract/gate-report.schema.json +242 -0
  212. package/contract/schema.json +636 -18
  213. package/dist/lib/contract-C2tN-NIP.js +409 -0
  214. package/dist/lib/contract-C2tN-NIP.js.map +1 -0
  215. package/dist/lib/contract.js +3 -1
  216. package/dist/lib/export-L1rzMCoW.js +651 -0
  217. package/dist/lib/export-L1rzMCoW.js.map +1 -0
  218. package/dist/lib/export.js +1 -0
  219. package/dist/lib/index.js +4383 -1831
  220. package/dist/lib/index.js.map +1 -1
  221. package/dist/lib/styles.css +1 -1
  222. package/dist/lib/validate-BF7eATfB.js +1781 -0
  223. package/dist/lib/validate-BF7eATfB.js.map +1 -0
  224. package/dist/types/contract/comparison.d.ts +65 -0
  225. package/dist/types/contract/document.d.ts +2 -2
  226. package/dist/types/contract/gate.d.ts +63 -0
  227. package/dist/types/contract/ids.d.ts +10 -0
  228. package/dist/types/contract/index.d.ts +5 -0
  229. package/dist/types/contract/inference.d.ts +10 -0
  230. package/dist/types/contract/migration.d.ts +8 -0
  231. package/dist/types/contract/serialize.d.ts +1 -0
  232. package/dist/types/contract/types.d.ts +122 -5
  233. package/dist/types/export/common.d.ts +44 -0
  234. package/dist/types/export/dbml.d.ts +3 -0
  235. package/dist/types/export/index.d.ts +10 -0
  236. package/dist/types/export/json.d.ts +7 -0
  237. package/dist/types/export/markdown.d.ts +4 -0
  238. package/dist/types/export/mermaid.d.ts +4 -0
  239. package/dist/types/export/types.d.ts +28 -0
  240. package/dist/types/index.d.ts +1 -0
  241. package/dist/types/viewer/Browse.d.ts +6 -2
  242. package/dist/types/viewer/Compare.d.ts +39 -0
  243. package/dist/types/viewer/Details.d.ts +40 -7
  244. package/dist/types/viewer/DownloadDialog.d.ts +16 -0
  245. package/dist/types/viewer/Inferred.d.ts +20 -0
  246. package/dist/types/viewer/Migrations.d.ts +14 -0
  247. package/dist/types/viewer/SchemaEdge.d.ts +3 -1
  248. package/dist/types/viewer/SchemaViewer.d.ts +2 -0
  249. package/dist/types/viewer/TableNode.d.ts +6 -0
  250. package/dist/types/viewer/brand.d.ts +32 -0
  251. package/dist/types/viewer/exportImage.d.ts +21 -2
  252. package/dist/types/viewer/graph.d.ts +16 -2
  253. package/dist/types/viewer/icons.d.ts +96 -0
  254. package/dist/types/viewer/intelligence.d.ts +55 -0
  255. package/dist/types/viewer/layout.d.ts +5 -0
  256. package/dist/types/viewer/offline.d.ts +9 -0
  257. package/dist/types/viewer/ui.d.ts +7 -29
  258. package/dist/viewer/app.css +1 -1
  259. package/dist/viewer/app.js +36 -8
  260. package/dist/viewer/favicon.ico +0 -0
  261. package/dist/viewer/favicon.svg +1 -1
  262. package/dist/viewer/index.html +2 -2
  263. package/dist/viewer/manifest.json +19 -13
  264. package/dist/viewer/offline.js +67 -0
  265. package/docs/contract.md +494 -26
  266. package/docs/integration.md +10 -7
  267. package/package.json +7 -2
  268. package/dist/lib/contract-N4axHCW3.js +0 -774
  269. package/dist/lib/contract-N4axHCW3.js.map +0 -1
@@ -0,0 +1,275 @@
1
+ {
2
+ "description": "In a combined document only what the database reported is compared: entities only the ORM declares are left out",
3
+ "expected": {
4
+ "baseline": {
5
+ "connection": "connection:a",
6
+ "schema": null
7
+ },
8
+ "complete": true,
9
+ "differences": [],
10
+ "id": "ccd30999b0df19108",
11
+ "omitted": 0,
12
+ "summary": {
13
+ "changed": 0,
14
+ "extra": 0,
15
+ "missing": 0
16
+ },
17
+ "target": {
18
+ "connection": "connection:b",
19
+ "schema": null
20
+ }
21
+ },
22
+ "input": {
23
+ "baseline": {
24
+ "connection": "connection:a",
25
+ "schema": null
26
+ },
27
+ "document": {
28
+ "connections": [
29
+ {
30
+ "coverage": {
31
+ "database": {
32
+ "complete": true,
33
+ "features": {
34
+ "checkConstraints": "complete",
35
+ "columnTypes": "complete",
36
+ "columns": "complete",
37
+ "comments": "complete",
38
+ "defaults": "complete",
39
+ "foreignKeys": "complete",
40
+ "includedColumns": "complete",
41
+ "indexExpressions": "complete",
42
+ "indexPredicates": "complete",
43
+ "indexes": "complete",
44
+ "primaryKeys": "complete",
45
+ "referentialActions": "complete",
46
+ "tables": "complete",
47
+ "uniqueConstraints": "complete"
48
+ },
49
+ "schemas": null
50
+ },
51
+ "declared": {
52
+ "complete": true,
53
+ "features": {
54
+ "checkConstraints": "complete",
55
+ "columnTypes": "complete",
56
+ "columns": "complete",
57
+ "comments": "complete",
58
+ "defaults": "complete",
59
+ "foreignKeys": "complete",
60
+ "includedColumns": "complete",
61
+ "indexExpressions": "complete",
62
+ "indexPredicates": "complete",
63
+ "indexes": "complete",
64
+ "primaryKeys": "complete",
65
+ "referentialActions": "complete",
66
+ "tables": "complete",
67
+ "uniqueConstraints": "complete"
68
+ },
69
+ "schemas": null
70
+ }
71
+ },
72
+ "defaultSchema": null,
73
+ "driver": "postgresql",
74
+ "id": "connection:a",
75
+ "name": "a",
76
+ "tables": [
77
+ {
78
+ "columns": [
79
+ {
80
+ "autoIncrement": false,
81
+ "collation": null,
82
+ "comment": null,
83
+ "default": null,
84
+ "enum": null,
85
+ "generated": null,
86
+ "name": "id",
87
+ "note": null,
88
+ "nullable": false,
89
+ "ormDefault": null,
90
+ "provenance": [
91
+ "database",
92
+ "declared"
93
+ ],
94
+ "timezone": null,
95
+ "type": "bigint",
96
+ "typeName": "bigint"
97
+ }
98
+ ],
99
+ "comment": null,
100
+ "constraints": [],
101
+ "foreignKeys": [],
102
+ "id": "a:t",
103
+ "indexes": [],
104
+ "name": "t",
105
+ "note": null,
106
+ "owner": {
107
+ "kind": "application",
108
+ "package": null
109
+ },
110
+ "primaryKey": [],
111
+ "provenance": [
112
+ "database",
113
+ "declared"
114
+ ],
115
+ "schema": null
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "coverage": {
121
+ "database": {
122
+ "complete": true,
123
+ "features": {
124
+ "checkConstraints": "complete",
125
+ "columnTypes": "complete",
126
+ "columns": "complete",
127
+ "comments": "complete",
128
+ "defaults": "complete",
129
+ "foreignKeys": "complete",
130
+ "includedColumns": "complete",
131
+ "indexExpressions": "complete",
132
+ "indexPredicates": "complete",
133
+ "indexes": "complete",
134
+ "primaryKeys": "complete",
135
+ "referentialActions": "complete",
136
+ "tables": "complete",
137
+ "uniqueConstraints": "complete"
138
+ },
139
+ "schemas": null
140
+ },
141
+ "declared": {
142
+ "complete": true,
143
+ "features": {
144
+ "checkConstraints": "complete",
145
+ "columnTypes": "complete",
146
+ "columns": "complete",
147
+ "comments": "complete",
148
+ "defaults": "complete",
149
+ "foreignKeys": "complete",
150
+ "includedColumns": "complete",
151
+ "indexExpressions": "complete",
152
+ "indexPredicates": "complete",
153
+ "indexes": "complete",
154
+ "primaryKeys": "complete",
155
+ "referentialActions": "complete",
156
+ "tables": "complete",
157
+ "uniqueConstraints": "complete"
158
+ },
159
+ "schemas": null
160
+ }
161
+ },
162
+ "defaultSchema": null,
163
+ "driver": "postgresql",
164
+ "id": "connection:b",
165
+ "name": "b",
166
+ "tables": [
167
+ {
168
+ "columns": [
169
+ {
170
+ "autoIncrement": false,
171
+ "collation": null,
172
+ "comment": null,
173
+ "default": null,
174
+ "enum": null,
175
+ "generated": null,
176
+ "name": "id",
177
+ "note": null,
178
+ "nullable": false,
179
+ "ormDefault": null,
180
+ "provenance": [
181
+ "database",
182
+ "declared"
183
+ ],
184
+ "timezone": null,
185
+ "type": "bigint",
186
+ "typeName": "bigint"
187
+ },
188
+ {
189
+ "autoIncrement": false,
190
+ "collation": null,
191
+ "comment": null,
192
+ "default": null,
193
+ "enum": null,
194
+ "generated": null,
195
+ "name": "ghost",
196
+ "note": null,
197
+ "nullable": false,
198
+ "ormDefault": null,
199
+ "provenance": [
200
+ "declared"
201
+ ],
202
+ "timezone": null,
203
+ "type": "text",
204
+ "typeName": "text"
205
+ }
206
+ ],
207
+ "comment": null,
208
+ "constraints": [],
209
+ "foreignKeys": [],
210
+ "id": "b:t",
211
+ "indexes": [],
212
+ "name": "t",
213
+ "note": null,
214
+ "owner": {
215
+ "kind": "application",
216
+ "package": null
217
+ },
218
+ "primaryKey": [],
219
+ "provenance": [
220
+ "database",
221
+ "declared"
222
+ ],
223
+ "schema": null
224
+ },
225
+ {
226
+ "columns": [
227
+ {
228
+ "autoIncrement": false,
229
+ "collation": null,
230
+ "comment": null,
231
+ "default": null,
232
+ "enum": null,
233
+ "generated": null,
234
+ "name": "id",
235
+ "note": null,
236
+ "nullable": false,
237
+ "ormDefault": null,
238
+ "provenance": [
239
+ "declared"
240
+ ],
241
+ "timezone": null,
242
+ "type": "bigint",
243
+ "typeName": "bigint"
244
+ }
245
+ ],
246
+ "comment": null,
247
+ "constraints": [],
248
+ "foreignKeys": [],
249
+ "id": "b:only",
250
+ "indexes": [],
251
+ "name": "only",
252
+ "note": null,
253
+ "owner": {
254
+ "kind": "application",
255
+ "package": null
256
+ },
257
+ "primaryKey": [],
258
+ "provenance": [
259
+ "declared"
260
+ ],
261
+ "schema": null
262
+ }
263
+ ]
264
+ }
265
+ ],
266
+ "source": "combined"
267
+ },
268
+ "limit": null,
269
+ "overrides": [],
270
+ "target": {
271
+ "connection": "connection:b",
272
+ "schema": null
273
+ }
274
+ }
275
+ }
@@ -0,0 +1,356 @@
1
+ {
2
+ "description": "Constraints match by kind and name, then by kind and definition; a changed check expression is likely",
3
+ "expected": {
4
+ "baseline": {
5
+ "connection": "connection:a",
6
+ "schema": null
7
+ },
8
+ "complete": true,
9
+ "differences": [
10
+ {
11
+ "baseline": {
12
+ "id": "a:t:constraint:c_old",
13
+ "label": "t.c_old",
14
+ "table": "a:t"
15
+ },
16
+ "certainty": "certain",
17
+ "change": "missing",
18
+ "fields": [],
19
+ "id": "xbfae1fb1bc481a0a",
20
+ "key": [
21
+ "t",
22
+ "check",
23
+ "name",
24
+ "c_old"
25
+ ],
26
+ "objectType": "constraint",
27
+ "severity": "warning",
28
+ "target": null
29
+ },
30
+ {
31
+ "baseline": {
32
+ "id": "a:t:constraint:c_total",
33
+ "label": "t.c_total",
34
+ "table": "a:t"
35
+ },
36
+ "certainty": "likely",
37
+ "change": "changed",
38
+ "fields": [
39
+ {
40
+ "baseline": "(total >= 0)",
41
+ "field": "expression",
42
+ "target": "(total > 0)"
43
+ }
44
+ ],
45
+ "id": "xa38b5fe31ff32104",
46
+ "key": [
47
+ "t",
48
+ "check",
49
+ "name",
50
+ "c_total"
51
+ ],
52
+ "objectType": "constraint",
53
+ "severity": "warning",
54
+ "target": {
55
+ "id": "b:t:constraint:c_total",
56
+ "label": "t.c_total",
57
+ "table": "b:t"
58
+ }
59
+ },
60
+ {
61
+ "baseline": {
62
+ "id": "a:t:constraint:u_code",
63
+ "label": "t.u_code",
64
+ "table": "a:t"
65
+ },
66
+ "certainty": "certain",
67
+ "change": "changed",
68
+ "fields": [
69
+ {
70
+ "baseline": "u_code",
71
+ "field": "name",
72
+ "target": "u_code_new"
73
+ }
74
+ ],
75
+ "id": "x93f14f8275e13f79",
76
+ "key": [
77
+ "t",
78
+ "unique",
79
+ "definition",
80
+ "code"
81
+ ],
82
+ "objectType": "constraint",
83
+ "severity": "warning",
84
+ "target": {
85
+ "id": "b:t:constraint:u_code_new",
86
+ "label": "t.u_code_new",
87
+ "table": "b:t"
88
+ }
89
+ }
90
+ ],
91
+ "id": "ccd30999b0df19108",
92
+ "omitted": 0,
93
+ "summary": {
94
+ "changed": 2,
95
+ "extra": 0,
96
+ "missing": 1
97
+ },
98
+ "target": {
99
+ "connection": "connection:b",
100
+ "schema": null
101
+ }
102
+ },
103
+ "input": {
104
+ "baseline": {
105
+ "connection": "connection:a",
106
+ "schema": null
107
+ },
108
+ "document": {
109
+ "connections": [
110
+ {
111
+ "coverage": {
112
+ "database": {
113
+ "complete": true,
114
+ "features": {
115
+ "checkConstraints": "complete",
116
+ "columnTypes": "complete",
117
+ "columns": "complete",
118
+ "comments": "complete",
119
+ "defaults": "complete",
120
+ "foreignKeys": "complete",
121
+ "includedColumns": "complete",
122
+ "indexExpressions": "complete",
123
+ "indexPredicates": "complete",
124
+ "indexes": "complete",
125
+ "primaryKeys": "complete",
126
+ "referentialActions": "complete",
127
+ "tables": "complete",
128
+ "uniqueConstraints": "complete"
129
+ },
130
+ "schemas": null
131
+ },
132
+ "declared": null
133
+ },
134
+ "defaultSchema": null,
135
+ "driver": "postgresql",
136
+ "id": "connection:a",
137
+ "name": "a",
138
+ "tables": [
139
+ {
140
+ "columns": [
141
+ {
142
+ "autoIncrement": false,
143
+ "collation": null,
144
+ "comment": null,
145
+ "default": null,
146
+ "enum": null,
147
+ "generated": null,
148
+ "name": "total",
149
+ "note": null,
150
+ "nullable": false,
151
+ "ormDefault": null,
152
+ "provenance": [
153
+ "database"
154
+ ],
155
+ "timezone": null,
156
+ "type": "bigint",
157
+ "typeName": "bigint"
158
+ },
159
+ {
160
+ "autoIncrement": false,
161
+ "collation": null,
162
+ "comment": null,
163
+ "default": null,
164
+ "enum": null,
165
+ "generated": null,
166
+ "name": "code",
167
+ "note": null,
168
+ "nullable": false,
169
+ "ormDefault": null,
170
+ "provenance": [
171
+ "database"
172
+ ],
173
+ "timezone": null,
174
+ "type": "text",
175
+ "typeName": "text"
176
+ }
177
+ ],
178
+ "comment": null,
179
+ "constraints": [
180
+ {
181
+ "columns": [
182
+ "total"
183
+ ],
184
+ "expression": "(total >= 0)",
185
+ "id": "a:t:constraint:c_total",
186
+ "kind": "check",
187
+ "name": "c_total",
188
+ "provenance": [
189
+ "database"
190
+ ]
191
+ },
192
+ {
193
+ "columns": [
194
+ "code"
195
+ ],
196
+ "expression": null,
197
+ "id": "a:t:constraint:u_code",
198
+ "kind": "unique",
199
+ "name": "u_code",
200
+ "provenance": [
201
+ "database"
202
+ ]
203
+ },
204
+ {
205
+ "columns": [
206
+ "total"
207
+ ],
208
+ "expression": "(total < 100)",
209
+ "id": "a:t:constraint:c_old",
210
+ "kind": "check",
211
+ "name": "c_old",
212
+ "provenance": [
213
+ "database"
214
+ ]
215
+ }
216
+ ],
217
+ "foreignKeys": [],
218
+ "id": "a:t",
219
+ "indexes": [],
220
+ "name": "t",
221
+ "note": null,
222
+ "owner": {
223
+ "kind": "application",
224
+ "package": null
225
+ },
226
+ "primaryKey": [],
227
+ "provenance": [
228
+ "database"
229
+ ],
230
+ "schema": null
231
+ }
232
+ ]
233
+ },
234
+ {
235
+ "coverage": {
236
+ "database": {
237
+ "complete": true,
238
+ "features": {
239
+ "checkConstraints": "complete",
240
+ "columnTypes": "complete",
241
+ "columns": "complete",
242
+ "comments": "complete",
243
+ "defaults": "complete",
244
+ "foreignKeys": "complete",
245
+ "includedColumns": "complete",
246
+ "indexExpressions": "complete",
247
+ "indexPredicates": "complete",
248
+ "indexes": "complete",
249
+ "primaryKeys": "complete",
250
+ "referentialActions": "complete",
251
+ "tables": "complete",
252
+ "uniqueConstraints": "complete"
253
+ },
254
+ "schemas": null
255
+ },
256
+ "declared": null
257
+ },
258
+ "defaultSchema": null,
259
+ "driver": "postgresql",
260
+ "id": "connection:b",
261
+ "name": "b",
262
+ "tables": [
263
+ {
264
+ "columns": [
265
+ {
266
+ "autoIncrement": false,
267
+ "collation": null,
268
+ "comment": null,
269
+ "default": null,
270
+ "enum": null,
271
+ "generated": null,
272
+ "name": "total",
273
+ "note": null,
274
+ "nullable": false,
275
+ "ormDefault": null,
276
+ "provenance": [
277
+ "database"
278
+ ],
279
+ "timezone": null,
280
+ "type": "bigint",
281
+ "typeName": "bigint"
282
+ },
283
+ {
284
+ "autoIncrement": false,
285
+ "collation": null,
286
+ "comment": null,
287
+ "default": null,
288
+ "enum": null,
289
+ "generated": null,
290
+ "name": "code",
291
+ "note": null,
292
+ "nullable": false,
293
+ "ormDefault": null,
294
+ "provenance": [
295
+ "database"
296
+ ],
297
+ "timezone": null,
298
+ "type": "text",
299
+ "typeName": "text"
300
+ }
301
+ ],
302
+ "comment": null,
303
+ "constraints": [
304
+ {
305
+ "columns": [
306
+ "total"
307
+ ],
308
+ "expression": "(total > 0)",
309
+ "id": "b:t:constraint:c_total",
310
+ "kind": "check",
311
+ "name": "c_total",
312
+ "provenance": [
313
+ "database"
314
+ ]
315
+ },
316
+ {
317
+ "columns": [
318
+ "code"
319
+ ],
320
+ "expression": null,
321
+ "id": "b:t:constraint:u_code_new",
322
+ "kind": "unique",
323
+ "name": "u_code_new",
324
+ "provenance": [
325
+ "database"
326
+ ]
327
+ }
328
+ ],
329
+ "foreignKeys": [],
330
+ "id": "b:t",
331
+ "indexes": [],
332
+ "name": "t",
333
+ "note": null,
334
+ "owner": {
335
+ "kind": "application",
336
+ "package": null
337
+ },
338
+ "primaryKey": [],
339
+ "provenance": [
340
+ "database"
341
+ ],
342
+ "schema": null
343
+ }
344
+ ]
345
+ }
346
+ ],
347
+ "source": "database"
348
+ },
349
+ "limit": null,
350
+ "overrides": [],
351
+ "target": {
352
+ "connection": "connection:b",
353
+ "schema": null
354
+ }
355
+ }
356
+ }