laranex-schema-viewer-ui 0.1.0 → 0.2.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.
@@ -0,0 +1,153 @@
1
+ {
2
+ "description": "A foreign key naming a table in another connection has no link: constraints never cross connections",
3
+ "expected": {
4
+ "derivedLinks": [],
5
+ "links": []
6
+ },
7
+ "input": {
8
+ "connections": [
9
+ {
10
+ "coverage": {
11
+ "database": null,
12
+ "declared": null
13
+ },
14
+ "defaultSchema": null,
15
+ "driver": "pgsql",
16
+ "id": "connection:a",
17
+ "name": "a",
18
+ "tables": [
19
+ {
20
+ "columns": [
21
+ {
22
+ "autoIncrement": false,
23
+ "collation": null,
24
+ "comment": null,
25
+ "default": null,
26
+ "enum": null,
27
+ "generated": null,
28
+ "name": "id",
29
+ "note": null,
30
+ "nullable": false,
31
+ "ormDefault": null,
32
+ "provenance": [
33
+ "database"
34
+ ],
35
+ "timezone": null,
36
+ "type": "integer",
37
+ "typeName": "integer"
38
+ }
39
+ ],
40
+ "comment": null,
41
+ "constraints": [],
42
+ "foreignKeys": [],
43
+ "id": "a:users",
44
+ "indexes": [],
45
+ "name": "users",
46
+ "note": null,
47
+ "owner": {
48
+ "kind": "application",
49
+ "package": null
50
+ },
51
+ "primaryKey": [
52
+ "id"
53
+ ],
54
+ "provenance": [
55
+ "database"
56
+ ],
57
+ "schema": null
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "coverage": {
63
+ "database": null,
64
+ "declared": null
65
+ },
66
+ "defaultSchema": null,
67
+ "driver": "mysql",
68
+ "id": "connection:b",
69
+ "name": "b",
70
+ "tables": [
71
+ {
72
+ "columns": [
73
+ {
74
+ "autoIncrement": false,
75
+ "collation": null,
76
+ "comment": null,
77
+ "default": null,
78
+ "enum": null,
79
+ "generated": null,
80
+ "name": "id",
81
+ "note": null,
82
+ "nullable": false,
83
+ "ormDefault": null,
84
+ "provenance": [
85
+ "database"
86
+ ],
87
+ "timezone": null,
88
+ "type": "integer",
89
+ "typeName": "integer"
90
+ },
91
+ {
92
+ "autoIncrement": false,
93
+ "collation": null,
94
+ "comment": null,
95
+ "default": null,
96
+ "enum": null,
97
+ "generated": null,
98
+ "name": "user_id",
99
+ "note": null,
100
+ "nullable": false,
101
+ "ormDefault": null,
102
+ "provenance": [
103
+ "database"
104
+ ],
105
+ "timezone": null,
106
+ "type": "integer",
107
+ "typeName": "integer"
108
+ }
109
+ ],
110
+ "comment": null,
111
+ "constraints": [],
112
+ "foreignKeys": [
113
+ {
114
+ "columns": [
115
+ "user_id"
116
+ ],
117
+ "deferrable": null,
118
+ "foreignColumns": [
119
+ "id"
120
+ ],
121
+ "foreignTable": "a:users",
122
+ "id": "b:sessions:fk:sessions_user_fk",
123
+ "initially": null,
124
+ "name": "sessions_user_fk",
125
+ "onDelete": null,
126
+ "onUpdate": null,
127
+ "provenance": [
128
+ "database"
129
+ ]
130
+ }
131
+ ],
132
+ "id": "b:sessions",
133
+ "indexes": [],
134
+ "name": "sessions",
135
+ "note": null,
136
+ "owner": {
137
+ "kind": "application",
138
+ "package": null
139
+ },
140
+ "primaryKey": [
141
+ "id"
142
+ ],
143
+ "provenance": [
144
+ "database"
145
+ ],
146
+ "schema": null
147
+ }
148
+ ]
149
+ }
150
+ ],
151
+ "relationships": []
152
+ }
153
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "description": "A relationship from a table in one connection to a table in another is a relationship link; no constraint is implied",
3
+ "expected": {
4
+ "derivedLinks": [],
5
+ "links": [
6
+ {
7
+ "foreignKey": null,
8
+ "from": {
9
+ "columns": [
10
+ "user_id"
11
+ ],
12
+ "table": "b:sessions"
13
+ },
14
+ "id": "lf0820d9a701f3777",
15
+ "note": null,
16
+ "polymorphic": false,
17
+ "relationships": [
18
+ "r:user"
19
+ ],
20
+ "state": "relationship",
21
+ "to": {
22
+ "columns": [
23
+ "id"
24
+ ],
25
+ "table": "a:users"
26
+ }
27
+ }
28
+ ]
29
+ },
30
+ "input": {
31
+ "connections": [
32
+ {
33
+ "coverage": {
34
+ "database": null,
35
+ "declared": null
36
+ },
37
+ "defaultSchema": null,
38
+ "driver": "pgsql",
39
+ "id": "connection:a",
40
+ "name": "a",
41
+ "tables": [
42
+ {
43
+ "columns": [
44
+ {
45
+ "autoIncrement": false,
46
+ "collation": null,
47
+ "comment": null,
48
+ "default": null,
49
+ "enum": null,
50
+ "generated": null,
51
+ "name": "id",
52
+ "note": null,
53
+ "nullable": false,
54
+ "ormDefault": null,
55
+ "provenance": [
56
+ "database"
57
+ ],
58
+ "timezone": null,
59
+ "type": "integer",
60
+ "typeName": "integer"
61
+ }
62
+ ],
63
+ "comment": null,
64
+ "constraints": [],
65
+ "foreignKeys": [],
66
+ "id": "a:users",
67
+ "indexes": [],
68
+ "name": "users",
69
+ "note": null,
70
+ "owner": {
71
+ "kind": "application",
72
+ "package": null
73
+ },
74
+ "primaryKey": [
75
+ "id"
76
+ ],
77
+ "provenance": [
78
+ "database"
79
+ ],
80
+ "schema": null
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "coverage": {
86
+ "database": null,
87
+ "declared": null
88
+ },
89
+ "defaultSchema": null,
90
+ "driver": "mysql",
91
+ "id": "connection:b",
92
+ "name": "b",
93
+ "tables": [
94
+ {
95
+ "columns": [
96
+ {
97
+ "autoIncrement": false,
98
+ "collation": null,
99
+ "comment": null,
100
+ "default": null,
101
+ "enum": null,
102
+ "generated": null,
103
+ "name": "id",
104
+ "note": null,
105
+ "nullable": false,
106
+ "ormDefault": null,
107
+ "provenance": [
108
+ "database"
109
+ ],
110
+ "timezone": null,
111
+ "type": "integer",
112
+ "typeName": "integer"
113
+ },
114
+ {
115
+ "autoIncrement": false,
116
+ "collation": null,
117
+ "comment": null,
118
+ "default": null,
119
+ "enum": null,
120
+ "generated": null,
121
+ "name": "user_id",
122
+ "note": null,
123
+ "nullable": false,
124
+ "ormDefault": null,
125
+ "provenance": [
126
+ "database"
127
+ ],
128
+ "timezone": null,
129
+ "type": "integer",
130
+ "typeName": "integer"
131
+ }
132
+ ],
133
+ "comment": null,
134
+ "constraints": [],
135
+ "foreignKeys": [],
136
+ "id": "b:sessions",
137
+ "indexes": [],
138
+ "name": "sessions",
139
+ "note": null,
140
+ "owner": {
141
+ "kind": "application",
142
+ "package": null
143
+ },
144
+ "primaryKey": [
145
+ "id"
146
+ ],
147
+ "provenance": [
148
+ "database"
149
+ ],
150
+ "schema": null
151
+ }
152
+ ]
153
+ }
154
+ ],
155
+ "relationships": [
156
+ {
157
+ "cardinality": "many-to-one",
158
+ "collection": false,
159
+ "constraints": [],
160
+ "id": "r:user",
161
+ "inverse": null,
162
+ "join": null,
163
+ "keys": {
164
+ "from": {
165
+ "columns": [
166
+ "user_id"
167
+ ],
168
+ "table": "b:sessions"
169
+ },
170
+ "to": {
171
+ "columns": [
172
+ "id"
173
+ ],
174
+ "table": "a:users"
175
+ }
176
+ },
177
+ "model": "m",
178
+ "name": "r:user",
179
+ "note": null,
180
+ "pivot": null,
181
+ "polymorphic": null,
182
+ "readOnly": false,
183
+ "relatedModel": null,
184
+ "relatedTable": "a:users",
185
+ "source": null,
186
+ "table": "b:sessions",
187
+ "through": null,
188
+ "type": "test"
189
+ }
190
+ ]
191
+ }
192
+ }
@@ -0,0 +1,311 @@
1
+ {
2
+ "description": "Tables with the same name in two connections are told apart by id: each foreign key links its own connection",
3
+ "expected": {
4
+ "derivedLinks": [],
5
+ "links": [
6
+ {
7
+ "foreignKey": "a:users:fk:users_team_fk",
8
+ "from": {
9
+ "columns": [
10
+ "team_id"
11
+ ],
12
+ "table": "a:users"
13
+ },
14
+ "id": "l0173fe23cf41a4c9",
15
+ "note": null,
16
+ "polymorphic": false,
17
+ "relationships": [],
18
+ "state": "foreign_key",
19
+ "to": {
20
+ "columns": [
21
+ "id"
22
+ ],
23
+ "table": "a:teams"
24
+ }
25
+ },
26
+ {
27
+ "foreignKey": "b:users:fk:users_team_fk",
28
+ "from": {
29
+ "columns": [
30
+ "team_id"
31
+ ],
32
+ "table": "b:users"
33
+ },
34
+ "id": "l356b5f317847a3e1",
35
+ "note": null,
36
+ "polymorphic": false,
37
+ "relationships": [],
38
+ "state": "foreign_key",
39
+ "to": {
40
+ "columns": [
41
+ "id"
42
+ ],
43
+ "table": "b:teams"
44
+ }
45
+ }
46
+ ]
47
+ },
48
+ "input": {
49
+ "connections": [
50
+ {
51
+ "coverage": {
52
+ "database": null,
53
+ "declared": null
54
+ },
55
+ "defaultSchema": null,
56
+ "driver": "pgsql",
57
+ "id": "connection:a",
58
+ "name": "a",
59
+ "tables": [
60
+ {
61
+ "columns": [
62
+ {
63
+ "autoIncrement": false,
64
+ "collation": null,
65
+ "comment": null,
66
+ "default": null,
67
+ "enum": null,
68
+ "generated": null,
69
+ "name": "id",
70
+ "note": null,
71
+ "nullable": false,
72
+ "ormDefault": null,
73
+ "provenance": [
74
+ "database"
75
+ ],
76
+ "timezone": null,
77
+ "type": "integer",
78
+ "typeName": "integer"
79
+ },
80
+ {
81
+ "autoIncrement": false,
82
+ "collation": null,
83
+ "comment": null,
84
+ "default": null,
85
+ "enum": null,
86
+ "generated": null,
87
+ "name": "team_id",
88
+ "note": null,
89
+ "nullable": false,
90
+ "ormDefault": null,
91
+ "provenance": [
92
+ "database"
93
+ ],
94
+ "timezone": null,
95
+ "type": "integer",
96
+ "typeName": "integer"
97
+ }
98
+ ],
99
+ "comment": null,
100
+ "constraints": [],
101
+ "foreignKeys": [
102
+ {
103
+ "columns": [
104
+ "team_id"
105
+ ],
106
+ "deferrable": null,
107
+ "foreignColumns": [
108
+ "id"
109
+ ],
110
+ "foreignTable": "a:teams",
111
+ "id": "a:users:fk:users_team_fk",
112
+ "initially": null,
113
+ "name": "users_team_fk",
114
+ "onDelete": null,
115
+ "onUpdate": null,
116
+ "provenance": [
117
+ "database"
118
+ ]
119
+ }
120
+ ],
121
+ "id": "a:users",
122
+ "indexes": [],
123
+ "name": "users",
124
+ "note": null,
125
+ "owner": {
126
+ "kind": "application",
127
+ "package": null
128
+ },
129
+ "primaryKey": [
130
+ "id"
131
+ ],
132
+ "provenance": [
133
+ "database"
134
+ ],
135
+ "schema": null
136
+ },
137
+ {
138
+ "columns": [
139
+ {
140
+ "autoIncrement": false,
141
+ "collation": null,
142
+ "comment": null,
143
+ "default": null,
144
+ "enum": null,
145
+ "generated": null,
146
+ "name": "id",
147
+ "note": null,
148
+ "nullable": false,
149
+ "ormDefault": null,
150
+ "provenance": [
151
+ "database"
152
+ ],
153
+ "timezone": null,
154
+ "type": "integer",
155
+ "typeName": "integer"
156
+ }
157
+ ],
158
+ "comment": null,
159
+ "constraints": [],
160
+ "foreignKeys": [],
161
+ "id": "a:teams",
162
+ "indexes": [],
163
+ "name": "teams",
164
+ "note": null,
165
+ "owner": {
166
+ "kind": "application",
167
+ "package": null
168
+ },
169
+ "primaryKey": [
170
+ "id"
171
+ ],
172
+ "provenance": [
173
+ "database"
174
+ ],
175
+ "schema": null
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "coverage": {
181
+ "database": null,
182
+ "declared": null
183
+ },
184
+ "defaultSchema": null,
185
+ "driver": "mysql",
186
+ "id": "connection:b",
187
+ "name": "b",
188
+ "tables": [
189
+ {
190
+ "columns": [
191
+ {
192
+ "autoIncrement": false,
193
+ "collation": null,
194
+ "comment": null,
195
+ "default": null,
196
+ "enum": null,
197
+ "generated": null,
198
+ "name": "id",
199
+ "note": null,
200
+ "nullable": false,
201
+ "ormDefault": null,
202
+ "provenance": [
203
+ "database"
204
+ ],
205
+ "timezone": null,
206
+ "type": "integer",
207
+ "typeName": "integer"
208
+ },
209
+ {
210
+ "autoIncrement": false,
211
+ "collation": null,
212
+ "comment": null,
213
+ "default": null,
214
+ "enum": null,
215
+ "generated": null,
216
+ "name": "team_id",
217
+ "note": null,
218
+ "nullable": false,
219
+ "ormDefault": null,
220
+ "provenance": [
221
+ "database"
222
+ ],
223
+ "timezone": null,
224
+ "type": "integer",
225
+ "typeName": "integer"
226
+ }
227
+ ],
228
+ "comment": null,
229
+ "constraints": [],
230
+ "foreignKeys": [
231
+ {
232
+ "columns": [
233
+ "team_id"
234
+ ],
235
+ "deferrable": null,
236
+ "foreignColumns": [
237
+ "id"
238
+ ],
239
+ "foreignTable": "b:teams",
240
+ "id": "b:users:fk:users_team_fk",
241
+ "initially": null,
242
+ "name": "users_team_fk",
243
+ "onDelete": null,
244
+ "onUpdate": null,
245
+ "provenance": [
246
+ "database"
247
+ ]
248
+ }
249
+ ],
250
+ "id": "b:users",
251
+ "indexes": [],
252
+ "name": "users",
253
+ "note": null,
254
+ "owner": {
255
+ "kind": "application",
256
+ "package": null
257
+ },
258
+ "primaryKey": [
259
+ "id"
260
+ ],
261
+ "provenance": [
262
+ "database"
263
+ ],
264
+ "schema": null
265
+ },
266
+ {
267
+ "columns": [
268
+ {
269
+ "autoIncrement": false,
270
+ "collation": null,
271
+ "comment": null,
272
+ "default": null,
273
+ "enum": null,
274
+ "generated": null,
275
+ "name": "id",
276
+ "note": null,
277
+ "nullable": false,
278
+ "ormDefault": null,
279
+ "provenance": [
280
+ "database"
281
+ ],
282
+ "timezone": null,
283
+ "type": "integer",
284
+ "typeName": "integer"
285
+ }
286
+ ],
287
+ "comment": null,
288
+ "constraints": [],
289
+ "foreignKeys": [],
290
+ "id": "b:teams",
291
+ "indexes": [],
292
+ "name": "teams",
293
+ "note": null,
294
+ "owner": {
295
+ "kind": "application",
296
+ "package": null
297
+ },
298
+ "primaryKey": [
299
+ "id"
300
+ ],
301
+ "provenance": [
302
+ "database"
303
+ ],
304
+ "schema": null
305
+ }
306
+ ]
307
+ }
308
+ ],
309
+ "relationships": []
310
+ }
311
+ }