• Josianne Hyson's avatar
    Create BulkImport::Entity model for import data · 43b16a5b
    Josianne Hyson authored
    We want to start importing Group and Project data directly from
    another GitLab instance, via the API. To do this, we need somewhere
    to store a mapping between the source entity and the destination
    entity.
    
    Create the Entity model which is associated with a BulkImport,
    and used to store the data required to link the entity (project or
    group) on the source instance and the destination instance.
    
    This model introduces:
    
    1. `bulk_import_id` -> the bulk import that this data belongs to.
    2. `parent_id` -> the parent ImportEntity that this one should be
       imported into
    3. `source_type` -> what kind of entity this is (group or project)
    4. `source_full_path` -> path to access the entity on the source
    5. `destination_name` -> what to call the entity on the when it's
       created
    6. `destination_namespace` -> where to store the entity on the
       destination.
    7. `status` -> for use with the state machine to determine the import
       status of this entity
    8. `jid` -> the job ID of the sidekiq job that will/has processed this
       import.
    
    This is a component of the Group Migration MVC epic:
    https://gitlab.com/groups/gitlab-org/-/epics/4374
    
    MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42978
    Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/250280
    43b16a5b
bulk_import.rb 400 Bytes