• Stan Hu's avatar
    Fix backups not working when feature_flags table does not exist · e2862180
    Stan Hu authored
    Previously this would fail if you attempted to restore the database:
    
    ```
    RAILS_ENV=test bundle exec rake db:reset
    RAILS_ENV=test bundle exec rake gitlab:backup:db:create
    RAILS_ENV=test bundle exec rake gitlab:db:drop_tables
    RAILS_ENV=test bundle exec rake gitlab:backup:db:restore
    ```
    
    The last step would attempt to read `backup_information.yml` and fail
    because the file isn't generated in the `gitlab:backup:db:create`
    task. We can disable the reading of that file since it's only needed
    in the `gitlab:backup:create` task.
    
    In addition, the third step is optional. Since the `feature_flags`
    table does not exist, the feature flag check that happened in the last
    step would fail.
    
    Changelog: fixed
    e2862180
manager.rb 15.7 KB