mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
20 lines
517 B
Ruby
20 lines
517 B
Ruby
|
|
class CreateTracks < ActiveRecord::Migration[8.0]
|
||
|
|
def change
|
||
|
|
create_table :tracks do |t|
|
||
|
|
t.datetime :start_at, null: false
|
||
|
|
t.datetime :end_at, null: false
|
||
|
|
t.references :user, null: false, foreign_key: true
|
||
|
|
t.line_string :original_path, null: false
|
||
|
|
t.float :distance
|
||
|
|
t.float :avg_speed
|
||
|
|
t.integer :duration
|
||
|
|
t.integer :elevation_gain
|
||
|
|
t.integer :elevation_loss
|
||
|
|
t.integer :elevation_max
|
||
|
|
t.integer :elevation_min
|
||
|
|
|
||
|
|
t.timestamps
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|