forked from mirrors/akkoma
Flake: migrate pinned_activities in jsonb
This commit is contained in:
parent
a92c43bc4b
commit
e67bd93d90
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do
|
||||||
execute "ALTER TABLE activities ADD PRIMARY KEY (id);"
|
execute "ALTER TABLE activities ADD PRIMARY KEY (id);"
|
||||||
execute "ALTER TABLE users ADD PRIMARY KEY (id);"
|
execute "ALTER TABLE users ADD PRIMARY KEY (id);"
|
||||||
|
|
||||||
|
execute "UPDATE users SET info = jsonb_set(info, '{pinned_activities}', array_to_json(ARRAY(select jsonb_array_elements_text(info->'pinned_activities')))::jsonb);"
|
||||||
|
|
||||||
# Fkeys:
|
# Fkeys:
|
||||||
# Activities - Referenced by:
|
# Activities - Referenced by:
|
||||||
# TABLE "notifications" CONSTRAINT "notifications_activity_id_fkey" FOREIGN KEY (activity_id) REFERENCES activities(id) ON DELETE CASCADE
|
# TABLE "notifications" CONSTRAINT "notifications_activity_id_fkey" FOREIGN KEY (activity_id) REFERENCES activities(id) ON DELETE CASCADE
|
||||||
|
|
Loading…
Reference in a new issue