This is my migration. And it is one of the tables in my database. I no longer need this table. Can I know what is the command I use to remove this table? or can I know where I can find commands to delete/remove migrations?
defmodule Blogs.Repo.Migrations.CreatePosts do
use Ecto.Migration
def change do
create table(:posts) do
add :title, :string, null: false
add :slug, :string, null: false
add :body, :string, null: false
timestamps()
end
create unique_index(:posts, [:title])
create unique_index(:posts, [:slug])
end
end
You’ll need to make a new migration file with a different name, and you can use the same format as you posted in the OP. Then run it with mix ecto.migrate