This commit is contained in:
parent
520c78aa13
commit
1faf54ab41
1 changed files with 13 additions and 0 deletions
13
priv/repo/migrations/20220806014830_remove_null_objects.exs
Normal file
13
priv/repo/migrations/20220806014830_remove_null_objects.exs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
defmodule Pleroma.Repo.Migrations.RemoveNullObjects do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def up do
|
||||||
|
statement = """
|
||||||
|
DELETE FROM objects
|
||||||
|
WHERE (data->>'type') is null;
|
||||||
|
"""
|
||||||
|
execute(statement)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down, do: :ok
|
||||||
|
end
|
Loading…
Reference in a new issue