Skip to content

Commit ac23cf1

Browse files
Bug fixes (#22)
* Uppercase schema bug fix * Fixing the infinite for loop * bump the version
1 parent 2086301 commit ac23cf1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

constraintsRestore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func fixPKey(pk constraint) {
5959
for totalViolators > 0 { // Loop till we get a 0 value (i.e 0 violation )
6060
// How many violations are we having, if zero then loop breaks
6161
totalViolators = getTotalPKViolator(pk.table, cols)
62-
for totalViolators > 0 { // Found violation, time to fix it
62+
if totalViolators > 0 { // Found violation, time to fix it
6363

6464
// If there are two or more columns forming a PK or UK
6565
// lets only fix column by column.

mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
var (
99
programName = "mock"
10-
programVersion = "v2.3"
10+
programVersion = "v2.4"
1111
ExecutionTimestamp = TimeNow()
1212
Path = fmt.Sprintf("%s/%s/%s", os.Getenv("HOME"), programName, ExecutionTimestamp)
1313
)

worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ func columnExtractor(tables []DBTables) []TableCollection {
6666
for _, t := range tables {
6767
var tempColumns []DBColumns
6868
if GreenplumOrPostgres == "postgres" {
69-
columns = columnExtractorPostgres(t.Schema, t.Table)
69+
columns = columnExtractorPostgres(fmt.Sprintf("\"%s\"", t.Schema), t.Table)
7070
} else {
71-
columns = columnExtractorGPDB(t.Schema, t.Table);
71+
columns = columnExtractorGPDB(fmt.Sprintf("\"%s\"", t.Schema), t.Table)
7272
}
7373

7474
// Loops through the columns and make a collection of tables

0 commit comments

Comments
 (0)