First pass of importing data

This commit is contained in:
Tom Bloor 2017-10-26 16:29:56 +01:00
parent eebac70276
commit e09974f0d9
12 changed files with 2347 additions and 1 deletions

View file

@ -0,0 +1,34 @@
-- Convert schema 'share/ddl/_source/deploy/13/001-auto.yml' to 'share/ddl/_source/deploy/14/001-auto.yml':;
;
BEGIN;
;
CREATE TABLE import_sets (
id INTEGER PRIMARY KEY NOT NULL,
date datetime NOT NULL
);
;
CREATE TABLE import_values (
id INTEGER PRIMARY KEY NOT NULL,
set_id integer NOT NULL,
user_name varchar(255) NOT NULL,
purchase_date datetime NOT NULL,
purchase_value varchar(255) NOT NULL,
org_name varchar(255) NOT NULL,
transaction_id varchar,
FOREIGN KEY (set_id) REFERENCES import_sets(id) ON DELETE NO ACTION ON UPDATE NO ACTION,
FOREIGN KEY (transaction_id) REFERENCES transactions(id) ON DELETE NO ACTION ON UPDATE NO ACTION
);
;
CREATE INDEX import_values_idx_set_id ON import_values (set_id);
;
CREATE INDEX import_values_idx_transaction_id ON import_values (transaction_id);
;
COMMIT;