mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 02:05:12 +00:00
Flake: migrate pinned_activities in jsonb
This commit is contained in:
parent
a92c43bc4b
commit
e67bd93d90
|
@ -37,6 +37,8 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do
|
|||
execute "ALTER TABLE activities 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:
|
||||
# Activities - Referenced by:
|
||||
# TABLE "notifications" CONSTRAINT "notifications_activity_id_fkey" FOREIGN KEY (activity_id) REFERENCES activities(id) ON DELETE CASCADE
|
||||
|
|
Loading…
Reference in a new issue