more performant deletes
This commit is contained in:
parent
30c5bbe2b9
commit
186abbd9cf
|
@ -2,7 +2,9 @@ defmodule Backend.Repo.Migrations.RemoveCrawlError do
|
|||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
execute("ALTER TABLE crawls DISABLE TRIGGER ALL", "ALTER TABLE crawls ENABLE TRIGGER ALL")
|
||||
execute("DELETE FROM crawls WHERE error IS NOT NULL", "")
|
||||
execute("ALTER TABLE crawls ENABLE TRIGGER ALL", "")
|
||||
|
||||
alter table(:crawls) do
|
||||
remove :error, :string
|
||||
|
|
Loading…
Reference in a new issue