Skip to content

Commit 3f08a2e

Browse files
committed
chore: update snapshots after full package sync
1 parent 65df070 commit 3f08a2e

2 files changed

Lines changed: 101 additions & 63 deletions

File tree

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

Lines changed: 101 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ exports[`db_meta_modules should have all expected module tables 1`] = `
2121
"profiles_module",
2222
"rls_module",
2323
"secrets_module",
24+
"sessions_module",
2425
"table_module",
2526
"table_template_module",
26-
"tokens_module",
2727
"user_auth_module",
2828
"users_module",
2929
"uuid_module",
@@ -34,7 +34,7 @@ exports[`db_meta_modules should have all expected module tables 1`] = `
3434
exports[`db_meta_modules should verify all module tables exist in metaschema_modules_public schema 1`] = `
3535
{
3636
"moduleTablesCount": 24,
37-
"totalTables": 26,
37+
"totalTables": 27,
3838
}
3939
`;
4040

@@ -150,13 +150,13 @@ exports[`db_meta_modules should verify field_module table structure 1`] = `
150150

151151
exports[`db_meta_modules should verify module table structures have database_id foreign keys 1`] = `
152152
{
153-
"constraintCount": 64896,
153+
"constraintCount": 69984,
154154
}
155155
`;
156156

157157
exports[`db_meta_modules should verify module tables have proper foreign key relationships 1`] = `
158158
{
159-
"constraintCount": 90954,
159+
"constraintCount": 100951,
160160
"foreignTables": [
161161
"apis",
162162
"database",
@@ -167,32 +167,121 @@ exports[`db_meta_modules should verify module tables have proper foreign key rel
167167
}
168168
`;
169169

170-
exports[`db_meta_modules should verify specific module table column defaults 1`] = `
170+
exports[`db_meta_modules should verify sessions_module table structure 1`] = `
171171
{
172-
"tokensDefaults": [
172+
"columns": [
173173
{
174174
"column_default": "uuid_generate_v4()",
175175
"column_name": "id",
176+
"data_type": "uuid",
177+
"is_nullable": "NO",
178+
},
179+
{
180+
"column_default": null,
181+
"column_name": "database_id",
182+
"data_type": "uuid",
183+
"is_nullable": "NO",
184+
},
185+
{
186+
"column_default": "uuid_nil()",
187+
"column_name": "schema_id",
188+
"data_type": "uuid",
189+
"is_nullable": "NO",
190+
},
191+
{
192+
"column_default": "uuid_nil()",
193+
"column_name": "sessions_table_id",
194+
"data_type": "uuid",
195+
"is_nullable": "NO",
196+
},
197+
{
198+
"column_default": "uuid_nil()",
199+
"column_name": "session_credentials_table_id",
200+
"data_type": "uuid",
201+
"is_nullable": "NO",
202+
},
203+
{
204+
"column_default": "uuid_nil()",
205+
"column_name": "auth_settings_table_id",
206+
"data_type": "uuid",
207+
"is_nullable": "NO",
208+
},
209+
{
210+
"column_default": "uuid_nil()",
211+
"column_name": "users_table_id",
212+
"data_type": "uuid",
213+
"is_nullable": "NO",
214+
},
215+
{
216+
"column_default": "'30 days'::interval",
217+
"column_name": "sessions_default_expiration",
218+
"data_type": "interval",
219+
"is_nullable": "NO",
220+
},
221+
{
222+
"column_default": "'sessions'::text",
223+
"column_name": "sessions_table",
224+
"data_type": "text",
225+
"is_nullable": "NO",
226+
},
227+
{
228+
"column_default": "'session_credentials'::text",
229+
"column_name": "session_credentials_table",
230+
"data_type": "text",
231+
"is_nullable": "NO",
232+
},
233+
{
234+
"column_default": "'app_auth_settings'::text",
235+
"column_name": "auth_settings_table",
236+
"data_type": "text",
237+
"is_nullable": "NO",
238+
},
239+
],
240+
}
241+
`;
242+
243+
exports[`db_meta_modules should verify specific module table column defaults 1`] = `
244+
{
245+
"sessionsDefaults": [
246+
{
247+
"column_default": "'app_auth_settings'::text",
248+
"column_name": "auth_settings_table",
176249
},
177250
{
178251
"column_default": "uuid_nil()",
179-
"column_name": "owned_table_id",
252+
"column_name": "auth_settings_table_id",
253+
},
254+
{
255+
"column_default": "uuid_generate_v4()",
256+
"column_name": "id",
180257
},
181258
{
182259
"column_default": "uuid_nil()",
183260
"column_name": "schema_id",
184261
},
262+
{
263+
"column_default": "'session_credentials'::text",
264+
"column_name": "session_credentials_table",
265+
},
185266
{
186267
"column_default": "uuid_nil()",
187-
"column_name": "table_id",
268+
"column_name": "session_credentials_table_id",
269+
},
270+
{
271+
"column_default": "'30 days'::interval",
272+
"column_name": "sessions_default_expiration",
188273
},
189274
{
190-
"column_default": "'3 days'::interval",
191-
"column_name": "tokens_default_expiration",
275+
"column_default": "'sessions'::text",
276+
"column_name": "sessions_table",
192277
},
193278
{
194-
"column_default": "'api_tokens'::text",
195-
"column_name": "tokens_table",
279+
"column_default": "uuid_nil()",
280+
"column_name": "sessions_table_id",
281+
},
282+
{
283+
"column_default": "uuid_nil()",
284+
"column_name": "users_table_id",
196285
},
197286
],
198287
"usersDefaults": [
@@ -334,55 +423,6 @@ exports[`db_meta_modules should verify table_template_module table structure 1`]
334423
}
335424
`;
336425

337-
exports[`db_meta_modules should verify tokens_module table structure 1`] = `
338-
{
339-
"columns": [
340-
{
341-
"column_default": "uuid_generate_v4()",
342-
"column_name": "id",
343-
"data_type": "uuid",
344-
"is_nullable": "NO",
345-
},
346-
{
347-
"column_default": null,
348-
"column_name": "database_id",
349-
"data_type": "uuid",
350-
"is_nullable": "NO",
351-
},
352-
{
353-
"column_default": "uuid_nil()",
354-
"column_name": "schema_id",
355-
"data_type": "uuid",
356-
"is_nullable": "NO",
357-
},
358-
{
359-
"column_default": "uuid_nil()",
360-
"column_name": "table_id",
361-
"data_type": "uuid",
362-
"is_nullable": "NO",
363-
},
364-
{
365-
"column_default": "uuid_nil()",
366-
"column_name": "owned_table_id",
367-
"data_type": "uuid",
368-
"is_nullable": "NO",
369-
},
370-
{
371-
"column_default": "'3 days'::interval",
372-
"column_name": "tokens_default_expiration",
373-
"data_type": "interval",
374-
"is_nullable": "NO",
375-
},
376-
{
377-
"column_default": "'api_tokens'::text",
378-
"column_name": "tokens_table",
379-
"data_type": "text",
380-
"is_nullable": "NO",
381-
},
382-
],
383-
}
384-
`;
385-
386426
exports[`db_meta_modules should verify users_module table structure 1`] = `
387427
{
388428
"columns": [

packages/metaschema-schema/__tests__/__snapshots__/meta.test.ts.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ exports[`db_meta functionality should handle complete meta workflow 1`] = `
77
"label": null,
88
"name": "my-meta-db",
99
"owner_id": "[ID]",
10-
"private_schema_name": null,
1110
"schema_hash": null,
12-
"schema_name": null,
1311
}
1412
`;
1513

0 commit comments

Comments
 (0)