Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #124 from vulcanize/refactor-mcd-configs
Browse files Browse the repository at this point in the history
Removes _checked from column name query
  • Loading branch information
yaoandrew authored Jul 31, 2019
2 parents f2547b5 + dc8d52a commit 65e762f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion libraries/shared/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func GetCheckedColumnNames(db *postgres.DB) ([]string, error) {
`SELECT column_name FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'checked_headers'
AND column_name ~ '_checked';`
AND column_name <> 'id'
AND column_name <> 'header_id';`

err := db.Select(&queryResult, columnNamesQuery)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions libraries/shared/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ var _ = Describe("Repository", func() {

func getExpectedColumnNames() []string {
return []string{
"column_1_checked",
"column_2_checked",
"column_3_checked",
"column_4_checked",
"column_1",
"column_2",
"column_3",
"column_4",
}
}

0 comments on commit 65e762f

Please sign in to comment.