From f6e2b3068864cb8a923b45d8c6305bc0439050b2 Mon Sep 17 00:00:00 2001 From: Jared Wolff Date: Mon, 9 Mar 2026 15:43:15 -0400 Subject: [PATCH] fix(ci): update references from db/schema.sql to sqlx migrations CI and Docker builds broke after removing db/ in favor of migrations/. - ci.yml: point psql init at migrations/20260307000000_initial_schema.sql - Dockerfile: COPY migrations instead of db; remove unused db copy in final stage - docker-build.yml: remove db/schema.sql presence check Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- .github/workflows/docker-build.yml | 3 --- Dockerfile | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e3d941f..8b7f0e2f 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Initialize test database - run: psql -h localhost -U postgres -d oxicloud_test -f db/schema.sql + run: psql -h localhost -U postgres -d oxicloud_test -f migrations/20260307000000_initial_schema.sql env: PGPASSWORD: postgres diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0b347043..1a2cfc30 100755 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -70,7 +70,4 @@ jobs: echo "=== Static files present ===" docker run --rm --entrypoint sh test/oxicloud:test -c "ls /app/static/index.html && echo 'OK: static files present'" - echo "=== DB schema present ===" - docker run --rm --entrypoint sh test/oxicloud:test -c "ls /app/db/schema.sql && echo 'OK: schema present'" - echo "✅ Docker build and test completed successfully" diff --git a/Dockerfile b/Dockerfile index 4c899176..4c5b81db 100755 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/registry COPY Cargo.toml Cargo.lock build.rs ./ COPY src src COPY static static -COPY db db +COPY migrations migrations # Build with all optimizations (DATABASE_URL only needed at compile-time for sqlx) ARG DATABASE_URL="postgres://postgres:postgres@localhost/oxicloud" RUN DATABASE_URL="${DATABASE_URL}" RUSTFLAGS="-C target-cpu=native" cargo build --release @@ -59,8 +59,6 @@ RUN chmod +x /usr/local/bin/entrypoint.sh # Copy processed static files (bundled/minified by build.rs in release) COPY --from=builder --chown=oxicloud:oxicloud /app/static-dist /app/static -COPY --chown=oxicloud:oxicloud db /app/db - # Create storage directory with proper permissions RUN mkdir -p /app/storage && chown -R oxicloud:oxicloud /app/storage