🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: change the default of the migration script (#4419)
Max Deichmann1d3c74435b05
diff --git a/.env.dev-azure.example b/.env.dev-azure.exampleindex a82ad144ad..7f8ef63fdd 100644--- a/.env.dev-azure.example+++ b/.env.dev-azure.example@@ -11,7 +11,7 @@ CLICKHOUSE_MIGRATION_URL="clickhouse://localhost:9000"CLICKHOUSE_URL="http://localhost:8123"CLICKHOUSE_USER="clickhouse"CLICKHOUSE_PASSWORD="clickhouse"-CLICKHOUSE_MIGRATION_CLUSTER_DISABLED="true"+CLICKHOUSE_CLUSTER_ENABLED="false"# Next Auth# You can generate a new secret on the command line with:diff --git a/.env.dev.example b/.env.dev.exampleindex c535aff19d..fc14737b39 100644--- a/.env.dev.example+++ b/.env.dev.example@@ -11,7 +11,7 @@ CLICKHOUSE_MIGRATION_URL="clickhouse://localhost:9000"CLICKHOUSE_URL="http://localhost:8123"CLICKHOUSE_USER="clickhouse"CLICKHOUSE_PASSWORD="clickhouse"-CLICKHOUSE_CLUSTER_DISABLED="true"+CLICKHOUSE_CLUSTER_ENABLED="false"# Next Auth# You can generate a new secret on the command line with:diff --git a/packages/shared/clickhouse/scripts/down.sh b/packages/shared/clickhouse/scripts/down.shindex c9b0725a4e..527c3de697 100644--- a/packages/shared/clickhouse/scripts/down.sh+++ b/packages/shared/clickhouse/scripts/down.sh@@ -19,22 +19,22 @@ thenfi# Construct the database URL-if [ "$CLICKHOUSE_CLUSTER_ENABLED" == "true" ] ; then+if [ "$CLICKHOUSE_CLUSTER_ENABLED" == "false" ] ; thenif [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"else- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"fi# Execute the up command- migrate -source file://clickhouse/migrations/clustered -database "$DATABASE_URL" down+ migrate -source file://clickhouse/migrations/unclustered -database "$DATABASE_URL" downelseif [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"else- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"fi# Execute the up command- migrate -source file://clickhouse/migrations/unclustered -database "$DATABASE_URL" down+ migrate -source file://clickhouse/migrations/clustered -database "$DATABASE_URL" downfi\ No newline at end of filediff --git a/packages/shared/clickhouse/scripts/up.sh b/packages/shared/clickhouse/scripts/up.shindex 40a5ea8cb2..574eafcc25 100644--- a/packages/shared/clickhouse/scripts/up.sh+++ b/packages/shared/clickhouse/scripts/up.sh@@ -19,22 +19,22 @@ thenfi# Construct the database URL-if [ "$CLICKHOUSE_CLUSTER_ENABLED" == "true" ] ; then+if [ "$CLICKHOUSE_CLUSTER_ENABLED" == "false" ] ; thenif [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"else- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"fi# Execute the up command- migrate -source file://clickhouse/migrations/clustered -database "$DATABASE_URL" up+ migrate -source file://clickhouse/migrations/unclustered -database "$DATABASE_URL" upelse- if [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"+if [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"else- DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-cluster-name=default&x-migrations-table-engine=ReplicatedMergeTree"fi# Execute the up command- migrate -source file://clickhouse/migrations/unclustered -database "$DATABASE_URL" up+ migrate -source file://clickhouse/migrations/clustered -database "$DATABASE_URL" upfi