dotfiles/priv/repo/migrations/20230609164352_create_servers.exs

19 lines
428 B
Elixir
Raw Normal View History

2023-06-09 19:13:27 +00:00
defmodule Prymn.Repo.Migrations.CreateServers do
use Ecto.Migration
def change do
2023-06-23 07:05:10 +00:00
create table("servers") do
2023-06-09 19:13:27 +00:00
add :name, :string
2023-06-23 07:05:10 +00:00
add :public_ip, :string
2023-06-19 20:28:24 +00:00
add :provider, :string
2023-07-09 16:41:41 +00:00
add :status, :string
2023-06-23 07:05:10 +00:00
add :registration_token, :binary
2023-06-09 19:13:27 +00:00
timestamps()
end
2023-06-23 07:05:10 +00:00
create index("servers", [:registration_token], unique: true)
2023-07-09 16:41:41 +00:00
create index("servers", [:public_ip], unique: true)
2023-06-09 19:13:27 +00:00
end
end