lemmy/migrations/2025-08-01-000034_no-image-token/down.sql
Dessalines 644a448aa9
[main] Fixing active counts slow queries. (#5907) (#5917)
* [0.19] Fixing active counts slow queries. (#5907)

* Fixing active counts slow queries.

* Simplify back to str tuple

* Batch site and community updates

* Using update from temp table

* Making aggs temp table use interval name.

* Make dev setup use optimized postgres.

* Addressing PR comments.

* Use ref

* Removing system custom info from customPostgresql.conf

* Forgot to remove old scheduled tasks.

* Making sure migrations aren't missing anything from release/v0.19

Checked using git diff --diff-filter D --stat release/v0.19 migrations

* Rename all migrations to come after release/v0.19 migrations

* Add liked_at is not null check.
2025-08-09 21:57:38 +02:00

19 lines
436 B
SQL

ALTER TABLE local_image
ADD COLUMN pictrs_delete_token text NOT NULL DEFAULT '';
ALTER TABLE local_image
ALTER COLUMN pictrs_delete_token DROP DEFAULT;
ALTER TABLE local_image
ADD COLUMN published_new timestamp with time zone DEFAULT now() NOT NULL;
UPDATE
local_image
SET
published_new = published;
ALTER TABLE local_image
DROP COLUMN published;
ALTER TABLE local_image RENAME published_new TO published;