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
|
use Ecto.Migration
|
||||||
|
|
||||||
def change do
|
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("DELETE FROM crawls WHERE error IS NOT NULL", "")
|
||||||
|
execute("ALTER TABLE crawls ENABLE TRIGGER ALL", "")
|
||||||
|
|
||||||
alter table(:crawls) do
|
alter table(:crawls) do
|
||||||
remove :error, :string
|
remove :error, :string
|
||||||
|
|
Loading…
Reference in a new issue