From cbe2ff86f1a6873b88e314011ee64b6c25f3359c Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 5 Feb 2020 22:26:37 -0500 Subject: Extract basics info from strava and display it --- migrations/2020-02-04-223649_entry_data/down.sql | 1 - migrations/2020-02-04-223649_entry_data/up.sql | 15 --------------- migrations/2020-02-05-020613_raw_data_entry/down.sql | 5 +++++ migrations/2020-02-05-020613_raw_data_entry/up.sql | 5 +++++ 4 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 migrations/2020-02-04-223649_entry_data/down.sql delete mode 100644 migrations/2020-02-04-223649_entry_data/up.sql create mode 100644 migrations/2020-02-05-020613_raw_data_entry/down.sql create mode 100644 migrations/2020-02-05-020613_raw_data_entry/up.sql (limited to 'migrations') diff --git a/migrations/2020-02-04-223649_entry_data/down.sql b/migrations/2020-02-04-223649_entry_data/down.sql deleted file mode 100644 index a10c419..0000000 --- a/migrations/2020-02-04-223649_entry_data/down.sql +++ /dev/null @@ -1 +0,0 @@ -drop table entry_data; diff --git a/migrations/2020-02-04-223649_entry_data/up.sql b/migrations/2020-02-04-223649_entry_data/up.sql deleted file mode 100644 index dde9288..0000000 --- a/migrations/2020-02-04-223649_entry_data/up.sql +++ /dev/null @@ -1,15 +0,0 @@ -create table entry_data ( - username varchar not null, - entry_type varchar(16) not null, - entry_id bigint not null, - data_type varchar(8) not null, - data_id bigint not null, - -primary key(username, entry_type, entry_id, data_type, data_id), - -foreign key (username, entry_type, entry_id) -references entries(username, entry_type, id), - -foreign key (data_type, data_id) -references raw_data(data_type, id) -); diff --git a/migrations/2020-02-05-020613_raw_data_entry/down.sql b/migrations/2020-02-05-020613_raw_data_entry/down.sql new file mode 100644 index 0000000..342a2d7 --- /dev/null +++ b/migrations/2020-02-05-020613_raw_data_entry/down.sql @@ -0,0 +1,5 @@ +alter table raw_data + drop column if exists entry_type; + +alter table raw_data + drop column if exists entry_id; diff --git a/migrations/2020-02-05-020613_raw_data_entry/up.sql b/migrations/2020-02-05-020613_raw_data_entry/up.sql new file mode 100644 index 0000000..a14d215 --- /dev/null +++ b/migrations/2020-02-05-020613_raw_data_entry/up.sql @@ -0,0 +1,5 @@ +alter table raw_data + add column entry_type varchar(16); + +alter table raw_data + add column entry_id bigint; -- cgit v1.2.3