improve(self-hosting): remove goose, custom migration, docs, remove zookeeper

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-17 20:54:54 +01:00
parent 16b6786165
commit 329c0885d4
47 changed files with 2181 additions and 1825 deletions

View File

@@ -13,7 +13,7 @@ import {
TABLE_NAMES,
formatClickhouseDate,
toDate,
} from '../clickhouse-client';
} from '../clickhouse/client';
import { createSqlBuilder } from '../sql-builder';
export function transformPropertyKey(property: string) {

View File

@@ -12,7 +12,7 @@ import {
chQuery,
convertClickhouseDateToJs,
formatClickhouseDate,
} from '../clickhouse-client';
} from '../clickhouse/client';
import type { EventMeta, Prisma } from '../prisma-client';
import { db } from '../prisma-client';
import { createSqlBuilder } from '../sql-builder';

View File

@@ -143,6 +143,10 @@ export async function connectUserToOrganization({
throw new Error('Invite not found');
}
if (process.env.ALLOW_INVITATION === 'false') {
throw new Error('Invitations are not allowed');
}
if (invite.expiresAt < new Date()) {
throw new Error('Invite expired');
}

View File

@@ -11,7 +11,7 @@ import {
ch,
chQuery,
formatClickhouseDate,
} from '../clickhouse-client';
} from '../clickhouse/client';
import { createSqlBuilder } from '../sql-builder';
export type IProfileMetrics = {

View File

@@ -1,6 +1,6 @@
import { escape } from 'sqlstring';
import { TABLE_NAMES, chQuery } from '../clickhouse-client';
import { TABLE_NAMES, chQuery } from '../clickhouse/client';
type IGetWeekRetentionInput = {
projectId: string;