mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* feature: Added ability to validate database schema * small scrut fixes * Check for extra tables and columns Print 30 items of schema updates, easier to copy paste sql * Now supports detections and suggested fix for: tables: missing, extra columns: missing, extra, incorrect indexes: missing, extra, incorrect * final changes + hook into travis
15 lines
407 B
Bash
Executable File
15 lines
407 B
Bash
Executable File
#!/bin/bash
|
|
GH_REPO="@github.com/librenms/librenms.git"
|
|
FULL_REPO="https://${GH_TOKEN}$GH_REPO"
|
|
|
|
git config user.name "librenms"
|
|
git config user.email "travis@librenms.org"
|
|
|
|
DBTEST=1 ./scripts/build-schema.php > misc/db_schema.yaml
|
|
STATUS=$(git status -s misc/db_schema.yaml)
|
|
|
|
if [[ "$STATUS" != "" ]]; then
|
|
git commit -m "DB Schema updated by travis after $TRAVIS_COMMIT"
|
|
git push -q origin master
|
|
fi
|