Project

Profile

Help

Refactor #2140

Updated by jortel@redhat.com over 8 years ago

The data in the _repo_distributors_ collection needs to be migrated into the _repository_distributor_ table in postgres. 

 For each field in the repo_distributors document: 
 <pre> 
 repo_distributors     =>    repository_distributor 
 ____________________|____________________________ 
                     => id (generated) 
 distributor_id        => name 
 distributor_type_id => type 
 auto_publish          => auto_publish 
 last_publish          => last_published 
                     => last_updated (auto-now) 
 repo_id               => repository_id (by Foreign Key relation) 
 scratchpad            => scratchpad (by Scratchpad relation) 
 </pre>  

 Notes: 
 * The configuration has been modeled as first class attributes of the distributor.    The config sub-document no longer exists.    Using the master-detail pattern, plugins will extend the configuration by contributing a new model: 
 <pre> 
 class MyDistributor(RepositoryDistributor): 
     setting1 = models.TextField() 
     setting2 = models.TextField() 
     ... 

     class Meta: 
         unique_together = () 
 </pre>

Back