aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/datamaps/db.go
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-07-27 07:25:41 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-07-27 07:25:41 +0100
commit438baa868bdf5f339d516784c054c766087f907f (patch)
treee41d19c02e5b0b6401cea2d2b5b52333ffc01390 /pkg/datamaps/db.go
parentee8bc3a307a6108db7c4195a828381caf207614e (diff)
type in schema
Diffstat (limited to 'pkg/datamaps/db.go')
-rw-r--r--pkg/datamaps/db.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/datamaps/db.go b/pkg/datamaps/db.go
index 4c3605c..ad388e2 100644
--- a/pkg/datamaps/db.go
+++ b/pkg/datamaps/db.go
@@ -18,8 +18,11 @@ func setupDB(path string) (*sql.DB, error) {
DROP TABLE IF EXISTS datamap_line;
DROP TABLE IF EXISTS return;
DROP TABLE IF EXISTS return_data;
- CREATE TABLE datamap(id INTEGER PRIMARY KEY, name TEXT, date_created TEXT);
- DROP TABLE IF EXISTS datamap_line;
+
+ CREATE TABLE datamap(
+ id INTEGER PRIMARY KEY,
+ name TEXT,
+ date_created TEXT);
CREATE TABLE datamap_line(
id INTEGER PRIMARY KEY,
@@ -31,10 +34,11 @@ func setupDB(path string) (*sql.DB, error) {
REFERENCES datamap(id)
ON DELETE CASCADE
);
+
CREATE TABLE return(
id INTEGER PRIMARY KEY,
name TEXT,
- data_created TEXT
+ date_created TEXT
);
CREATE TABLE return_data(
id INTEGER PRIMARY KEY,