PR #482 — schema changes fk_rails_0e1f2a3b4c comments.task_id → tasks.id ON DELETE CASCADEfk_rails_1f2a3b4c5d comments.author_id → users.idfk_rails_2a3b4c5d6e comments.parent_id → comments.idfk_rails_w1 task_watchers.task_id → tasks.id ON DELETE CASCADEfk_rails_w2 task_watchers.user_id → users.idfk_rails_7b8c9d0e1f tasks.assignee_id → users.id ON DELETE SET NULLfk_rails_8c9d0e1f2a tasks.reporter_id → users.idfk_rails_9d0e1f2a3b tasks.parent_task_id → tasks.idfk_rails_6e7f8a9b0c notifications.recipient_id → users.id ON DELETE CASCADEpublic.comments Changed: 1 column removed, 1 index removedcommentschanged: 1 column removed, 1 index removedCHANGEDid bigint NOT NULL primary key default: nextval('public.comments_id_seq'::regclass)primary keyPKidbiginttask_id bigint NOT NULL → tasks(id) on delete cascade fk_rails_0e1f2a3b4c index index_comments_on_task_id (task_id)foreign key → tasks(id) on delete cascade fk_rails_0e1f2a3b4cFKin 1 index index index_comments_on_task_id (task_id)IXtask_idbigintauthor_id bigint NOT NULL → users(id) fk_rails_1f2a3b4c5d index index_comments_on_author_id (author_id)foreign key → users(id) fk_rails_1f2a3b4c5dFKin 1 index index index_comments_on_author_id (author_id)IXauthor_idbigintparent_id bigint → comments(id) fk_rails_2a3b4c5d6eforeign key → comments(id) fk_rails_2a3b4c5d6eFKparent_idbigintnullable?body text NOT NULLbodytextedited_at timestamp(6) without time zone−edited_attimestamp(6)nullable?created_at timestamp(6) without time zone NOT NULLcreated_attimestamp(6)updated_at timestamp(6) without time zone NOT NULLupdated_attimestamp(6)INDEXES & CONSTRAINTSCREATE INDEX ON public.comments USING btree (parent_id)−IXindex_comments_on_parent_id(parent_id)public.task_watcherstask_watcherstable addedNEWid bigint NOT NULL primary keyprimary keyPKidbiginttask_id bigint NOT NULL → tasks(id) on delete cascade fk_rails_w1 unique index index_task_watchers_on_task_id_and_user_id (task_id, user_id)foreign key → tasks(id) on delete cascade fk_rails_w1FKin 1 index unique index index_task_watchers_on_task_id_and_user_id (task_id, user_id)IXtask_idbigintuser_id bigint NOT NULL → users(id) fk_rails_w2 unique index index_task_watchers_on_task_id_and_user_id (task_id, user_id)foreign key → users(id) fk_rails_w2FKin 1 index unique index index_task_watchers_on_task_id_and_user_id (task_id, user_id)IXuser_idbigintcreated_at timestamp(6) without time zone NOT NULLcreated_attimestamp(6)public.tasks Changed: 1 column added, 1 column changedtaskschanged: 1 column added, 1 column changedCHANGED2 relations to hidden tables↗2id bigint NOT NULL primary key default: nextval('public.tasks_id_seq'::regclass)primary keyPKidbigintproject_id bigint NOT NULL → projects(id) on delete cascade fk_rails_6a7b8c9d0e index index_tasks_on_project_id_and_position (project_id, position)foreign key → projects(id) on delete cascade fk_rails_6a7b8c9d0eFKin 1 index index index_tasks_on_project_id_and_position (project_id, position)IXproject_idbigintassignee_id bigint → users(id) on delete set null fk_rails_7b8c9d0e1f index index_tasks_on_assignee_id (assignee_id)foreign key → users(id) on delete set null fk_rails_7b8c9d0e1fFKin 1 index index index_tasks_on_assignee_id (assignee_id)IXassignee_idbigintnullable?reporter_id bigint NOT NULL → users(id) fk_rails_8c9d0e1f2aforeign key → users(id) fk_rails_8c9d0e1f2aFKreporter_idbigintparent_task_id bigint → tasks(id) fk_rails_9d0e1f2a3bforeign key → tasks(id) fk_rails_9d0e1f2a3bFKparent_task_idbigintnullable?title character varying NOT NULLtitlevarcharbody textbodytextnullable?status public.task_status NOT NULL default: 'todo'::public.task_statusstatustask_statuspriority smallint NOT NULL default: 0 type: integer → smallint~priorityint → smallintestimate_minutes integer+estimate_minutesintnullable?due_on datedue_ondatenullable?completed_at timestamp(6) without time zonecompleted_attimestamp(6)nullable?position integer Manual sort order within a project. index index_tasks_on_project_id_and_position (project_id, position)in 1 index index index_tasks_on_project_id_and_position (project_id, position)IXpositionintnullable?created_at timestamp(6) without time zone NOT NULLcreated_attimestamp(6)updated_at timestamp(6) without time zone NOT NULLupdated_attimestamp(6)public.users Changed: 2 columns added, 1 column changeduserschanged: 2 columns added, 1 column changedCHANGED4 relations to hidden tables↗4id bigint NOT NULL primary key default: nextval('public.users_id_seq'::regclass)primary keyPKidbigintemail public.citext NOT NULL unique index index_users_on_email (email)unique unique index index_users_on_email (email)UQemailcitextname character varying NOT NULL nullable: NULL → NOT NULL~namevarcharencrypted_password character varying NOT NULL default: ''::character varyingencrypted_passwordvarcharreset_password_token character varying unique index index_users_on_reset_password_token (reset_password_token)unique unique index index_users_on_reset_password_token (reset_password_token)UQreset_password_tokenvarcharnullable?reset_password_sent_at timestamp(6) without time zonereset_password_sent_attimestamp(6)nullable?last_sign_in_at timestamp(6) without time zonelast_sign_in_attimestamp(6)nullable?time_zone character varying NOT NULL default: 'UTC'::character varyingtime_zonevarcharlocale character varying(10) NOT NULL default: 'en'::character varying+localevarchar(10)avatar_url text+avatar_urltextnullable?created_at timestamp(6) without time zone NOT NULLcreated_attimestamp(6)updated_at timestamp(6) without time zone NOT NULLupdated_attimestamp(6)public.notificationsnotificationstable removedDROPPEDid bigint NOT NULL primary key default: nextval('public.notifications_id_seq'::regclass)primary keyPKidbigintrecipient_id bigint NOT NULL → users(id) on delete cascade fk_rails_6e7f8a9b0c index index_notifications_on_recipient_id_unread (recipient_id) where (read_at IS NULL)foreign key → users(id) on delete cascade fk_rails_6e7f8a9b0cFKin 1 index index index_notifications_on_recipient_id_unread (recipient_id) where (read_at IS NULL)IXrecipient_idbigintnotifiable_type character varying NOT NULL index index_notifications_on_notifiable (notifiable_type, notifiable_id)in 1 index index index_notifications_on_notifiable (notifiable_type, notifiable_id)IXnotifiable_typevarcharnotifiable_id bigint NOT NULL index index_notifications_on_notifiable (notifiable_type, notifiable_id)in 1 index index index_notifications_on_notifiable (notifiable_type, notifiable_id)IXnotifiable_idbigintkind character varying NOT NULLkindvarcharread_at timestamp(6) without time zoneread_attimestamp(6)nullable?created_at timestamp(6) without time zone NOT NULLcreated_attimestamp(6)