fleet/git-hooks/backend/hooks/db-schema
2023-10-31 09:59:47 -06:00

11 lines
No EOL
290 B
Bash

#!/bin/bash
## DB Schema Dump
if [[ $DB_SCHEMA_DUMP ]]; then
make dump-test-schema
if [[ $(git diff server/datastore/mysql/schema.sql) ]]; then
echo "❌ fail: uncommited changes in schema.sql"
echo "please run `make dump-test-schema` and commit the changes"
exit 1
fi
fi