Skip to content

Commit ae5f231

Browse files
committed
fix: add missing snapshots for field_module, table_module, table_template_module
1 parent 92995c4 commit ae5f231

1 file changed

Lines changed: 171 additions & 0 deletions

File tree

packages/metaschema-modules/__tests__/__snapshots__/modules.test.ts.snap

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,67 @@ exports[`db_meta_modules should verify emails_module table structure 1`] = `
8787
}
8888
`;
8989

90+
exports[`db_meta_modules should verify field_module table structure 1`] = `
91+
{
92+
"columns": [
93+
{
94+
"column_default": "uuid_generate_v4()",
95+
"column_name": "id",
96+
"data_type": "uuid",
97+
"is_nullable": "NO",
98+
},
99+
{
100+
"column_default": null,
101+
"column_name": "database_id",
102+
"data_type": "uuid",
103+
"is_nullable": "NO",
104+
},
105+
{
106+
"column_default": "uuid_nil()",
107+
"column_name": "private_schema_id",
108+
"data_type": "uuid",
109+
"is_nullable": "NO",
110+
},
111+
{
112+
"column_default": "uuid_nil()",
113+
"column_name": "table_id",
114+
"data_type": "uuid",
115+
"is_nullable": "NO",
116+
},
117+
{
118+
"column_default": "uuid_nil()",
119+
"column_name": "field_id",
120+
"data_type": "uuid",
121+
"is_nullable": "NO",
122+
},
123+
{
124+
"column_default": null,
125+
"column_name": "node_type",
126+
"data_type": "text",
127+
"is_nullable": "NO",
128+
},
129+
{
130+
"column_default": "'{}'::jsonb",
131+
"column_name": "data",
132+
"data_type": "jsonb",
133+
"is_nullable": "NO",
134+
},
135+
{
136+
"column_default": null,
137+
"column_name": "triggers",
138+
"data_type": "ARRAY",
139+
"is_nullable": "YES",
140+
},
141+
{
142+
"column_default": null,
143+
"column_name": "functions",
144+
"data_type": "ARRAY",
145+
"is_nullable": "YES",
146+
},
147+
],
148+
}
149+
`;
150+
90151
exports[`db_meta_modules should verify module table structures have database_id foreign keys 1`] = `
91152
{
92153
"constraintCount": 69984,
@@ -179,6 +240,116 @@ exports[`db_meta_modules should verify specific module table column defaults 1`]
179240
}
180241
`;
181242

243+
exports[`db_meta_modules should verify table_module table structure 1`] = `
244+
{
245+
"columns": [
246+
{
247+
"column_default": "uuid_generate_v4()",
248+
"column_name": "id",
249+
"data_type": "uuid",
250+
"is_nullable": "NO",
251+
},
252+
{
253+
"column_default": null,
254+
"column_name": "database_id",
255+
"data_type": "uuid",
256+
"is_nullable": "NO",
257+
},
258+
{
259+
"column_default": "uuid_nil()",
260+
"column_name": "private_schema_id",
261+
"data_type": "uuid",
262+
"is_nullable": "NO",
263+
},
264+
{
265+
"column_default": null,
266+
"column_name": "table_id",
267+
"data_type": "uuid",
268+
"is_nullable": "NO",
269+
},
270+
{
271+
"column_default": null,
272+
"column_name": "node_type",
273+
"data_type": "text",
274+
"is_nullable": "NO",
275+
},
276+
{
277+
"column_default": "'{}'::jsonb",
278+
"column_name": "data",
279+
"data_type": "jsonb",
280+
"is_nullable": "NO",
281+
},
282+
{
283+
"column_default": null,
284+
"column_name": "fields",
285+
"data_type": "ARRAY",
286+
"is_nullable": "YES",
287+
},
288+
],
289+
}
290+
`;
291+
292+
exports[`db_meta_modules should verify table_template_module table structure 1`] = `
293+
{
294+
"columns": [
295+
{
296+
"column_default": "uuid_generate_v4()",
297+
"column_name": "id",
298+
"data_type": "uuid",
299+
"is_nullable": "NO",
300+
},
301+
{
302+
"column_default": null,
303+
"column_name": "database_id",
304+
"data_type": "uuid",
305+
"is_nullable": "NO",
306+
},
307+
{
308+
"column_default": "uuid_nil()",
309+
"column_name": "schema_id",
310+
"data_type": "uuid",
311+
"is_nullable": "NO",
312+
},
313+
{
314+
"column_default": "uuid_nil()",
315+
"column_name": "private_schema_id",
316+
"data_type": "uuid",
317+
"is_nullable": "NO",
318+
},
319+
{
320+
"column_default": "uuid_nil()",
321+
"column_name": "table_id",
322+
"data_type": "uuid",
323+
"is_nullable": "NO",
324+
},
325+
{
326+
"column_default": "uuid_nil()",
327+
"column_name": "owner_table_id",
328+
"data_type": "uuid",
329+
"is_nullable": "NO",
330+
},
331+
{
332+
"column_default": null,
333+
"column_name": "table_name",
334+
"data_type": "text",
335+
"is_nullable": "NO",
336+
},
337+
{
338+
"column_default": null,
339+
"column_name": "node_type",
340+
"data_type": "text",
341+
"is_nullable": "NO",
342+
},
343+
{
344+
"column_default": "'{}'::jsonb",
345+
"column_name": "data",
346+
"data_type": "jsonb",
347+
"is_nullable": "NO",
348+
},
349+
],
350+
}
351+
`;
352+
182353
exports[`db_meta_modules should verify sessions_module table structure 1`] = `
183354
{
184355
"columns": [

0 commit comments

Comments
 (0)