projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
make conversation-id deterministic (#154)
[akkoma]
/
priv
/
repo
/
optional_migrations
/
destructive
/
remove_null_object_type_records
/
20220806014830_remove_null_objects.exs
diff --git a/priv/repo/optional_migrations/destructive/remove_null_object_type_records/20220806014830_remove_null_objects.exs
b/priv/repo/optional_migrations/destructive/remove_null_object_type_records/20220806014830_remove_null_objects.exs
new file mode 100644
(file)
index 0000000..
308c3db
--- /dev/null
+++ b/
priv/repo/optional_migrations/destructive/remove_null_object_type_records/20220806014830_remove_null_objects.exs
@@ -0,0
+1,14
@@
+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