aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-07-28 08:23:50 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-07-28 08:23:50 +0100
commit75b8d72dd6c17582a77575e4a3e4a7abb6ffcce7 (patch)
tree8c125715f3f3f969587ac5e49ca4ccb2f0333c2c
parent6ecfdefdb5010ea0e74656525996f52de172cd02 (diff)
removed UNIQUE which didnt make sense after consideration
-rw-r--r--pkg/datamaps/db.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/datamaps/db.go b/pkg/datamaps/db.go
index 2d675a6..30ebd6a 100644
--- a/pkg/datamaps/db.go
+++ b/pkg/datamaps/db.go
@@ -38,8 +38,7 @@ func setupDB(path string) (*sql.DB, error) {
CREATE TABLE return(
id INTEGER PRIMARY KEY,
name TEXT,
- date_created TEXT,
- UNIQUE(name)
+ date_created TEXT
);
CREATE TABLE return_data(
@@ -185,7 +184,7 @@ func importXLSXtoDB(dm_name string, return_name string, file string, db *sql.DB)
res, err := stmtReturn.Exec(return_name, time.Now())
if err != nil {
- err := fmt.Errorf("%v\nReturn '%s' already in database. Use a different name.", err, return_name)
+ err := fmt.Errorf("%v\nCannot create %s", err, return_name)
fmt.Println(err.Error())
os.Exit(1)
}