Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ repos:
language: system
types: [nix]
exclude: extra
- id: sqlx
name: SQLX Database up-to-date
entry: >-
bash -euo pipefail -c 'DB_URL="sqlite://./opsqueue/opsqueue_example_database_schema.db";
if [[ -f ./opsqueue/opsqueue_example_database_schema.db ]]; then
sqlx migrate run --database-url "$DB_URL" --source ./migrations;
else
sqlx database setup --database-url "$DB_URL" --source ./migrations;
fi'
language: system
files: ^(migrations|opsqueue/migrations)/.*\.sql$
pass_filenames: false
- id: sqlx-test-needs-migrator
name: Require `#[sqlx::test(migrator = "crate::MIGRATOR")]` for test-build speed
entry: '#\[sqlx::test\]'
Expand Down
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ let
pkgs.biome
pkgs.nixfmt
pkgs.pre-commit
pkgs.python3Packages.identify
pkgs.python3Packages.pre-commit-hooks
pkgs.ruff
pkgs.typos
Expand Down
Binary file modified opsqueue/opsqueue_example_database_schema.db
Binary file not shown.
Loading