Remove clickhouse check requiring elevated permissions (#12006)

This check was un-necessary, it will fail after in anycase. Let's leave
it to the user to create the DB
This commit is contained in:
Félix Malfait
2025-05-13 15:36:55 +02:00
committed by GitHub
parent efffac2a1a
commit fb615ed201

View File

@ -20,19 +20,6 @@ const clickHouseUrl = () => {
);
};
async function ensureDatabaseExists() {
const [url, database] = clickHouseUrl().split(/\/(?=[^/]*$)/);
const client = createClient({
url,
});
await client.command({
query: `CREATE DATABASE IF NOT EXISTS "${database}"`,
});
await client.close();
}
async function ensureMigrationTable(client: ClickHouseClient) {
await client.command({
query: `
@ -71,8 +58,6 @@ async function runMigrations() {
const dir = path.join(__dirname);
const files = fs.readdirSync(dir).filter((f) => f.endsWith('.sql'));
await ensureDatabaseExists();
const client = createClient({
url: clickHouseUrl(),
clickhouse_settings: {