Fiz manualmente uma comparação dos schemas de um fórum Discourse criado há mais de 5 anos e de uma instalação recente; você pode ver as diferenças aqui:
https://www.diffchecker.com/lZrp2jxJ
São principalmente mudanças de bigint para integer e de character varying(255) para character varying, além de algumas restrições not null ausentes, mas também há alguns índices faltando.
Aqui estão as linhas que indicam isso:
Linha 1646 - faltando:
Index "public.index_badges_on_badge_type_id"
Column | Type | Key? | Definition Column | Type | Key? | Definition
--------+------------------------+------+------------ ---------------+---------+------+---------------
name | character varying(255) | yes | name badge_type_id | integer | yes | badge_type_id
btree, for table "public.badges"
3301 - faltando:
Index "public.index_user_badges_on_user_id"
Column | Type | Key? | Definition
---------+---------+------+------------
user_id | integer | yes | user_id
btree, for table "public.user_badges"
4639 - faltando:
Index "public.schema_migrations_pkey"
Column | Type | Key? | Definition
---------+-------------------+------+------------
version | character varying | yes | version
primary key, btree, for table "public.schema_migrations"
5487 - parcialmente faltando:
Table "public.topic_search_data"
Column | Type | Collation | Nullable | Default Column | Type | Collation | Nullable | Default
-------------+------------------------+-----------+----------+--------- -------------+-------------------+-----------+----------+-----------------------------------------------------
topic_id | integer | | not null | topic_id | integer | | not null | nextval('topic_search_data_topic_id_seq'::regclass)
raw_data | text | | | raw_data | text | | |
locale | character varying(255) | | not null | locale | character varying | | not null |
search_data | tsvector | | | search_data | tsvector | | |
version | integer | | | 0 version | integer | | | 0
5506 - faltando:
Sequence "public.topic_search_data_topic_id_seq"
Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
---------+-------+---------+------------+-----------+---------+-------
integer | 1 | 1 | 2147483647 | 1 | no | 1
Owned by: public.topic_search_data.topic_id
6044 - faltando:
"index_user_badges_on_user_id" btree (user_id)
Devo me preocupar com algo aqui? Devo adicionar os índices manualmente? Alguma outra observação ou algo mais que se destaque para vocês? (São quase 5h da manhã aqui e estou com dificuldade para manter os olhos abertos
)