micrach/migrations/3-remove_posts_updated_at_default.sql
Yanislav Igonin 783e577311
Feature - Threads archivation (#4)
* todo

* update env var

* add new var to config

* update GetCount (not archived threads)

* wip on threads count check

* feat: add get oldest updated at thread

* feat: add archivation method for oldest threads

* feat: add migrations for posts timefields

* feat: now child posts created without updated_at

* feat: add threads archivation
2021-11-20 20:13:05 +03:00

10 lines
175 B
SQL

ALTER TABLE posts
ALTER COLUMN updated_at DROP NOT NULL;
ALTER TABLE posts
ALTER COLUMN updated_at DROP DEFAULT;
UPDATE posts
SET updated_at = null
WHERE is_parent != true;