Refactor #2182
Updated by jortel@redhat.com over 8 years ago
The data in the _repo_importers_ collection needs to be migrated into the _repository_importer_ table in postgres. For each field in the repo_importers document: <pre> repo_importers => repository_importer ______________________________|____________________________ => id (generated) importer_id => name importer_type_id => type config['feed'] => feed_url config['validate'] => validate config['ssl_validation'] => ssl_validation config['ssl_ca_cert'] => ssl_ca_certificate config['ssl_client_cert'] => ssl_client_certificate config['ssl_client_key'] => ssl_client_key config['proxy_host'] \ config['proxy_port'] | => proxy_url (joined as scheme://user:password@host:port) (joined) config['proxy_username'] | config['proxy_password'] / config['basic_auth_username'] => basic_auth_user config['basic_auth_password'] => basic_auth_password config['download_policy'] => download_policy config['max_downloads'] => max_concurrent_downloads config['max_speed'] => max_download_bandwidth last_sync => last_sync => 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 importer. The config sub-document no longer exists. Using the master-detail pattern, plugins will extend the configuration by contributing a new model: <pre> class MyImporter(RepositoryImporter): setting1 = models.TextField() setting2 = models.TextField() ... class Meta: unique_together = () </pre>