None of the specs in ee/spec/migrations/geo works

They fail because of different problems:

      # PG::UndefinedColumn:
      #   ERROR:  column "repository_retry_count" does not exist
      #   LINE 1: ...roject_registry SET resync_repository = 't' WHERE repository...

or

ActiveModel::UnknownAttributeError:
        unknown attribute 'file_type' for #<Class:0x00007f9a8d338310>.

or


     StandardError:
       An error has occurred, all later migrations canceled:

       PG::UndefinedTable: ERROR:  relation "lfs_object_registry" does not exist
       LINE 1: SELECT COUNT(*) AS count FROM "lfs_object_registry" WHERE "l...

or

     Failure/Error: reg0 = registry.create!(file_id: 1, state: 0, success: false, file_type: 'placeholder')

     ActiveModel::UnknownAttributeError:
       unknown attribute 'success' for #<Class:0x00007f9a5cd8bcd0>.

or

Failure/Error: connection.send(...)

StandardError:
  An error has occurred, this and all later migrations canceled:

  PG::DuplicateTable: ERROR:  relation "project_registry" already exists

It seems like the behaviour explained in https://docs.gitlab.com/ee/development/testing_guide/testing_migrations_guide.html#testing-a-non-activerecordmigration-class doesn't work properly.

Edited by Valery Sizov