MCPcopy Index your code
hub / github.com/PostHog/posthog / createOrganization

Function createOrganization

plugin-server/functional_tests/api.ts:149–166  ·  view source on GitHub ↗
(pgClient: Pool)

Source from the content-addressed store, hash-verified

147}
148
149export const createOrganization = async (pgClient: Pool) => {
150 const organizationId = new UUIDT().toString()
151 await insertRow(pgClient, 'posthog_organization', {
152 id: organizationId,
153 name: 'TEST ORG',
154 plugins_access_level: 9,
155 created_at: new Date().toISOString(),
156 updated_at: new Date().toISOString(),
157 personalization: '{}', // DEPRECATED
158 setup_section_2_completed: true, // DEPRECATED
159 for_internal_metrics: false,
160 available_features: [],
161 domain_whitelist: [],
162 is_member_join_email_enabled: false,
163 slug: Math.round(Math.random() * 20000),
164 })
165 return organizationId
166}
167
168export const createTeam = async (
169 pgClient: Pool,

Calls 2

insertRowFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…