defmodule <%= module_prefix %>.Repo.Migrations.CreateLogTable do use Ecto.Migration def change do <%= if not is_nil(db_prefix) do %> execute("CREATE SCHEMA <%= db_prefix %>", "DROP SCHEMA <%= db_prefix %> CASCADE") <% end %> create table(<%= inspect(schema_name) %>, primary_key: false<%= if not is_nil(db_prefix), do: ", prefix: \"#{db_prefix}\"" %>) do add :id, :binary_id, primary_key: true add :level, :string add :application, :string add :domain, :string add :file, :string add :function, :string add :line, :string add :module, :string add :pid, :string add :time, :utc_datetime add :message, :string add :metadata, :map add :request_id, :string timestamps() end end end