Files
archived-teslamate/priv/repo/migrations/20190330190000_create_charging_processes.exs
2021-10-22 12:46:22 +02:00

23 lines
757 B
Elixir
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
defmodule TeslaMate.Repo.Migrations.CreateChargingProcesses do
use Ecto.Migration
def change do
create table(:charging_processes) do
# Note the typo: 'nul' This is fixed in 20211022103654_add_not_null_constraint_to_start_date
add(:start_date, :utc_datetime, nul: false)
add(:end_date, :utc_datetime)
add(:charge_energy_added, :float)
add(:start_soc, :float)
add(:end_soc, :float)
add(:start_battery_level, :integer)
add(:end_battery_level, :integer)
add(:calculated_max_range, :integer)
add(:duration_min, :integer)
add(:outside_temp_avg, :float)
add(:car_id, references(:cars), null: false)
add(:position_id, references(:positions), null: false)
end
end
end