mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 00:01:34 +00:00
chore: add SKIP_MIN_VERSION_CHECK env var and database URL docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,10 +51,15 @@ After making code changes, you MUST run the appropriate checks and fix all error
|
||||
|
||||
`backend/summarized_schema.txt` provides a compact overview of all tables, columns, types, ENUMs, and foreign keys. Use it to quickly understand the data model and relationships. Note: this file is a simplified summary — it omits indexes, constraints details, and other metadata.
|
||||
|
||||
For exact table definitions (indexes, constraints, column defaults, etc.), query the database directly:
|
||||
For exact table definitions (indexes, constraints, column defaults, etc.), query the database directly.
|
||||
|
||||
**IMPORTANT**: The database name varies per worktree/branch. Always read `.env.local` first to get the correct `DATABASE_URL`. The default `windmill` database is only used on the main branch — worktrees use branch-specific database names (e.g., `windmill_add_fast_filter`). Using the wrong database means your queries, inserts, and migrations will target stale or empty data.
|
||||
|
||||
```bash
|
||||
psql postgres://postgres:changeme@localhost:5432/windmill
|
||||
# Always check .env.local first:
|
||||
grep DATABASE_URL .env.local
|
||||
# Then use the correct database URL, e.g.:
|
||||
psql "postgres://postgres:changeme@127.0.0.1:5432/windmill_add_fast_filter"
|
||||
```
|
||||
|
||||
Useful psql commands:
|
||||
|
||||
@@ -101,12 +101,21 @@ async fn fast_filter_migration(db: &DB) -> Result<(), Error> {
|
||||
|
||||
async fn fast_filter_migration_inner(db: &DB) -> Result<(), Error> {
|
||||
// Wait until all workers are at least version 1.647 so new jobs write fast_filter
|
||||
loop {
|
||||
if MIN_VERSION_IS_AT_LEAST_1_647.met().await {
|
||||
break;
|
||||
let skip_version_check = std::env::var("SKIP_MIN_VERSION_CHECK")
|
||||
.map(|v| v == "1" || v == "true")
|
||||
.unwrap_or(false);
|
||||
if !skip_version_check {
|
||||
loop {
|
||||
if MIN_VERSION_IS_AT_LEAST_1_647.met().await {
|
||||
break;
|
||||
}
|
||||
tracing::info!("fast_filter migration: waiting for all workers to be >= 1.647");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(30)).await;
|
||||
}
|
||||
tracing::info!("fast_filter migration: waiting for all workers to be >= 1.647");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(30)).await;
|
||||
} else {
|
||||
tracing::info!(
|
||||
"fast_filter migration: skipping version check (SKIP_MIN_VERSION_CHECK=true)"
|
||||
);
|
||||
}
|
||||
|
||||
// Backfill existing rows in batches (skip skipped jobs — they stay NULL)
|
||||
|
||||
Reference in New Issue
Block a user