AMO5AXDS5VIY6BJIWD36RI2WNGOSXPVLMD22RMJ6PENQIOHMFPIQC
defmodule Cake.Repo.Migrations.CreateLayouts do
use Ecto.Migration
def change do
create table(:layouts, primary_key: false) do
add :id, :uuid, primary_key: true, null: false, default: fragment("gen_random_uuid()")
add :name, :string
add :version, :integer
add :layer_template, references(:layer_templates, on_delete: :nothing)
add :attribute_map, :map
add :template, :map
timestamps()
end
create index(:layouts, [:layer_template])
end
end