Skip to content

Commit 2950d33

Browse files
authored
Fixed the importing error (#34)
* Update version * Update version * Fixed the bug that when occurred in import * Update version
1 parent 41a56b0 commit 2950d33

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
## 0.5.1 (2018-01-09)
1+
## 0.5.3 (2018-01-13)
2+
3+
### Added
4+
5+
- Nothing
6+
7+
### Deprecated
8+
9+
- Nothing
10+
11+
### Removed
12+
13+
- Nothing
14+
15+
### Fixed
16+
17+
- Fixed the importing bug that when column contains 0 value at the beginning of the string
18+
19+
20+
## 0.5.2 (2018-01-09)
221

322
### Added
423

cmd/carpenter/command/seed.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ func parseCSV(tableName, filename string) (columnNames []string, seeds mysql.See
115115
v = nil
116116
} else if v, err = strconv.ParseFloat(r, 64); err != nil {
117117
v = r
118+
} else {
119+
if len(string(r)) > 1 && string(string(r)[0]) == "0" {
120+
v = string(r)
121+
}
118122
}
119123
columnData = append(columnData, v)
120124
}

cmd/carpenter/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package main
22

33
const Name string = "carpenter"
4-
const Version string = "0.5.2"
4+
const Version string = "0.5.3"

0 commit comments

Comments
 (0)