25 lines
615 B
Elixir
25 lines
615 B
Elixir
defmodule DediboxPrices.Repo.Migrations.CreateOffers do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:offers, primary_key: false) do
|
|
add(:id, :binary_id, null: false, primary_key: true)
|
|
add :name, :string, null: false
|
|
add :tag, :text, null: false
|
|
add :cpu, :string
|
|
add :memory, :integer
|
|
add :disk_amount, :integer
|
|
add :disk_size, :integer
|
|
add :disk_properties, :string
|
|
add :bandwith, :integer
|
|
add :rpn, :string
|
|
add :disponibility, :integer
|
|
add :price, :float
|
|
|
|
timestamps()
|
|
end
|
|
|
|
create index(:offers, [:name])
|
|
end
|
|
end
|