MCPcopy Index your code
hub / github.com/coder/coder / DisableForeignKeysAndTriggers

Function DisableForeignKeysAndTriggers

coderd/database/dbtestutil/db.go:328–336  ·  view source on GitHub ↗

Deprecated: disable foreign keys was created to aid in migrating off of the test-only in-memory database. Do not use this in new code.

(t *testing.T, db database.Store)

Source from the content-addressed store, hash-verified

326// Deprecated: disable foreign keys was created to aid in migrating off
327// of the test-only in-memory database. Do not use this in new code.
328func DisableForeignKeysAndTriggers(t *testing.T, db database.Store) {
329 err := db.DisableForeignKeysAndTriggers(context.Background())
330 if t != nil {
331 require.NoError(t, err)
332 }
333 if err != nil {
334 panic(err)
335 }
336}

Callers 13

TestGroupParamFunction · 0.92
TestWorkspaceAgentParamFunction · 0.92
TestTemplateParamFunction · 0.92
TestTemplateVersionParamFunction · 0.92
TestActiveUsersFunction · 0.92
TestExtraMethodsMethod · 0.92
TestTailnetFunctionsMethod · 0.92

Calls 1

Tested by 13

TestGroupParamFunction · 0.74
TestWorkspaceAgentParamFunction · 0.74
TestTemplateParamFunction · 0.74
TestTemplateVersionParamFunction · 0.74
TestActiveUsersFunction · 0.74
TestExtraMethodsMethod · 0.74
TestTailnetFunctionsMethod · 0.74