farmbot_os/farmbot_core/priv/asset/migrations/20181017230326_create_senso...

16 lines
430 B
Elixir

defmodule Farmbot.Asset.Repo.Migrations.CreateSensorsTable do
use Ecto.Migration
def change do
create table("sensors", primary_key: false) do
add(:local_id, :binary_id, primary_key: true)
add(:id, :id)
add(:pin, :integer)
add(:mode, :integer)
add(:label, :string)
add(:monitor, :boolean, default: true)
timestamps(inserted_at: :created_at, type: :utc_datetime)
end
end
end