diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-07-27 07:25:41 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-07-27 07:25:41 +0100 |
commit | 438baa868bdf5f339d516784c054c766087f907f (patch) | |
tree | e41d19c02e5b0b6401cea2d2b5b52333ffc01390 | |
parent | ee8bc3a307a6108db7c4195a828381caf207614e (diff) |
type in schema
-rw-r--r-- | pkg/datamaps/db.go | 10 |
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, |