主に bigint から integer へ、character varying(255) から character varying への変更や、いくつかの not null 制約の欠落が見られますが、いくつかのインデックスも不足しています。
それらを指摘する行は以下の通りです:
行 1646 - 欠落:
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 - 欠落:
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 - 欠落:
Index "public.schema_migrations_pkey"
Column | Type | Key? | Definition
---------+-------------------+------+------------
version | character varying | yes | version
primary key, btree, for table "public.schema_migrations"
行 5487 - 部分的に欠落:
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