BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9cd0d68f
Unverified
Commit
9cd0d68f
authored
Sep 19, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rake task to check db schema is valid
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b7cd5897
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
.gitlab-ci.yml
.gitlab-ci.yml
+6
-0
schema_changed.sh
scripts/schema_changed.sh
+10
-0
No files found.
.gitlab-ci.yml
View file @
9cd0d68f
...
...
@@ -517,6 +517,12 @@ db:seed_fu-mysql:
<<
:
*db-seed_fu
<<
:
*use-mysql
db:check-schema-pg
:
<<
:
*db-migrate-reset
<<
:
*use-pg
script
:
-
source scripts/schema_changed.sh
# Frontend-related jobs
gitlab:assets:compile
:
<<
:
*dedicated-runner
...
...
scripts/schema_changed.sh
0 → 100644
View file @
9cd0d68f
function
schema_changed
()
{
if
[[
!
-z
`
git diff
--name-only
--
db/schema.rb
`
]]
;
then
echo
"db/schema.rb after rake db:migrate:reset is different from one in the repository"
exit
1
else
echo
"db/schema.rb after rake db:migrate:reset matches one in the repository"
fi
}
schema_changed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment