Set project_id as not null field for project_features

We have a lot of project_feature orphan records:

gitlabhq_production=# SELECT COUNT(*) from "project_features" WHERE project_id IS NULL;
 count  
--------
 479475
(1 row)

I suspect most of them are being created when project is imported.

The following discussion from !14235 (merged) should be addressed:

  • @felipe_artur commented on a discussion: (+5 comments)

    @stanhu Adding project_id as NOT NULL created a lot of problems when importing projects. I will create a separate issue to deal with it as you suggested.

Assignee Loading
Time tracking Loading