aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrations/20260831000000_rename_type_to_external_sport_type.sql5
-rw-r--r--db/schema.sql5
2 files changed, 8 insertions, 2 deletions
diff --git a/db/migrations/20260831000000_rename_type_to_external_sport_type.sql b/db/migrations/20260831000000_rename_type_to_external_sport_type.sql
new file mode 100644
index 0000000..5a734c1
--- /dev/null
+++ b/db/migrations/20260831000000_rename_type_to_external_sport_type.sql
@@ -0,0 +1,5 @@
+-- migrate:up
+ALTER TABLE rides RENAME COLUMN type TO external_sport_type;
+
+-- migrate:down
+ALTER TABLE rides RENAME COLUMN external_sport_type TO type;
diff --git a/db/schema.sql b/db/schema.sql
index 79f4c62..a97b7f1 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -4,7 +4,7 @@ CREATE TABLE rides (
external_id text unique not null,
gpx_path text not null,
name text not null,
- type text not null,
+ external_sport_type text not null,
start_date text not null,
distance_m real not null,
external_moving_time_s integer not null,
@@ -44,4 +44,5 @@ INSERT INTO "schema_migrations" (version) VALUES
('20260823000000'),
('20260827000000'),
('20260828000000'),
- ('20260829000000');
+ ('20260829000000'),
+ ('20260831000000');