{"action":"created","issue":{"url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/164","labels_url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/164/comments","events_url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/164/events","html_url":"https://github.com/stefanfoulis/cmsplugin-filer/issues/164","id":51864870,"number":164,"title":"Deprecate & remove cmsplugin_filer_link","user":{"login":"jsma","id":24574,"avatar_url":"https://avatars.githubusercontent.com/u/24574?v=3","gravatar_id":"","url":"https://api.github.com/users/jsma","html_url":"https://github.com/jsma","followers_url":"https://api.github.com/users/jsma/followers","following_url":"https://api.github.com/users/jsma/following{/other_user}","gists_url":"https://api.github.com/users/jsma/gists{/gist_id}","starred_url":"https://api.github.com/users/jsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsma/subscriptions","organizations_url":"https://api.github.com/users/jsma/orgs","repos_url":"https://api.github.com/users/jsma/repos","events_url":"https://api.github.com/users/jsma/events{/privacy}","received_events_url":"https://api.github.com/users/jsma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"yakky","id":714711,"avatar_url":"https://avatars.githubusercontent.com/u/714711?v=3","gravatar_id":"","url":"https://api.github.com/users/yakky","html_url":"https://github.com/yakky","followers_url":"https://api.github.com/users/yakky/followers","following_url":"https://api.github.com/users/yakky/following{/other_user}","gists_url":"https://api.github.com/users/yakky/gists{/gist_id}","starred_url":"https://api.github.com/users/yakky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakky/subscriptions","organizations_url":"https://api.github.com/users/yakky/orgs","repos_url":"https://api.github.com/users/yakky/repos","events_url":"https://api.github.com/users/yakky/events{/privacy}","received_events_url":"https://api.github.com/users/yakky/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2014-12-12T23:23:58Z","updated_at":"2015-03-06T14:23:06Z","closed_at":null,"body":"`cmsplugin_filer_link` has not been as maintained as the other plugins. The only feature it appears to offer beyond what the better maintained upstream [djangocms-link](https://github.com/divio/djangocms-link) plugin is the option of linking to a file, but of course this is what the `cmsplugin_filer_file` and `cmsplugin_filer_image` are for, making this plugin redundant and unnecessary. \r\n\r\nBelow is an example migration that users can use to migrate away from cmsplugin_filer_link to use the upstream djangocms-link instead. This could be referenced in the changelog for upgrade instructions. \r\n\r\nFirst create an empty migration. Since we are migrating local data between apps whose migrations we do not control, we'll need to create this migration in an app whose migrations we **do** control:\r\n\r\n    ./manage.py makemigrations my_app --empty\r\n\r\nThe contents should look something like:\r\n\r\n    # -*- coding: utf-8 -*-\r\n    from __future__ import unicode_literals\r\n\r\n    from django.db import models, migrations\r\n\r\n\r\n    def migrate_links(apps, schema_editor):\r\n        FilerLinkPlugin = apps.get_model('cmsplugin_filer_link', 'FilerLinkPlugin')\r\n        Link = apps.get_model('djangocms_link', 'Link')\r\n        CMSPlugin = apps.get_model('cms', 'CMSPlugin')\r\n        for old_link in FilerLinkPlugin.objects.all():\r\n            cms_plugin = old_link.cmsplugin_ptr\r\n            new_link = Link()\r\n            new_link.cmsplugin_ptr = cms_plugin\r\n            new_link.position = cms_plugin.position\r\n            new_link.language = cms_plugin.language\r\n            new_link.plugin_type = 'LinkPlugin'\r\n            new_link.creation_date = cms_plugin.creation_date\r\n            new_link.changed_date = cms_plugin.changed_date\r\n            new_link.parent_id = cms_plugin.parent_id\r\n            new_link.placeholder_id = cms_plugin.placeholder_id\r\n            new_link.depth = cms_plugin.depth\r\n            new_link.numchild = cms_plugin.numchild\r\n            new_link.path = cms_plugin.path\r\n\r\n            new_link.name = old_link.name\r\n            new_link.url = old_link.url\r\n            new_link.page_link_id = old_link.page_link_id\r\n            new_link.mailto = old_link.mailto\r\n\r\n            new_link.save()\r\n\r\n\r\n    class Migration(migrations.Migration):\r\n\r\n        dependencies = [\r\n            ('my_app', '0001_initial'),\r\n            ('cms', '0007_auto_20141028_1559'),\r\n            ('cmsplugin_filer_link', '0001_initial'),\r\n            ('djangocms_link', '0002_auto_20140929_1705'),\r\n        ]\r\n\r\n        operations = [\r\n            migrations.RunPython(migrate_links)\r\n        ]\r\n\r\n**Note:** You'll need to replace the 'my_app' dependency with details of the app you created the migration in and point it at the last migration for that app. The other dependencies assume the absolute latest Django 1.7 compatible migrations on the develop/master branches of each application. You may need to change the names of the migrations in `dependencies` depending on whether you are using Django < 1.7 and also whether you are using django-cms develop branch or 3.0.x.\r\n\r\nYou can then remove `cmsplugin_filer_link` from `INSTALLED_APPS` and `MIGRATION_MODULES` and can `DROP TABLE cmsplugin_filer_link_filerlinkplugin;` or just leave the table."},"comment":{"url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/comments/77565773","html_url":"https://github.com/stefanfoulis/cmsplugin-filer/issues/164#issuecomment-77565773","issue_url":"https://api.github.com/repos/stefanfoulis/cmsplugin-filer/issues/164","id":77565773,"user":{"login":"darbula","id":1332382,"avatar_url":"https://avatars.githubusercontent.com/u/1332382?v=3","gravatar_id":"","url":"https://api.github.com/users/darbula","html_url":"https://github.com/darbula","followers_url":"https://api.github.com/users/darbula/followers","following_url":"https://api.github.com/users/darbula/following{/other_user}","gists_url":"https://api.github.com/users/darbula/gists{/gist_id}","starred_url":"https://api.github.com/users/darbula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darbula/subscriptions","organizations_url":"https://api.github.com/users/darbula/orgs","repos_url":"https://api.github.com/users/darbula/repos","events_url":"https://api.github.com/users/darbula/events{/privacy}","received_events_url":"https://api.github.com/users/darbula/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T14:23:06Z","updated_at":"2015-03-06T14:23:06Z","body":"This migration assumes that every filer link links to page or url, but it can be a link to file, also. In that case it should be migrated to `cmsplugin_filer_file`."}}