-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate DrupalFile and DrupalUpload tables and remove associated code to simplify codebase #4076
Comments
Added to GCI! |
So is each node in this case similar to a Map Node? Sorry I'm unfamiliar with plots2 architecture.
^ Also does this mean looking at the file characteristic of each node, getting the url and pasting it on the bottom of the node document? Not really sure what's required and if this should be done automated. |
Can I work on this ? |
Hey @TildaDares, @jywarren! |
Hello, yes you can, thank you! Can we help you get oriented a bit? I wonder if @anirudhprabhakaran3 is able to make some suggestions? Please note @anirudhprabhakaran3 has begun this project already in #11387 and perhaps that is already complete, but the deletion of the records afterwards is not yet complete? |
Hi! Yes, you're right. #11387 takes care of the migration of all data, but the actual deletion and dropping of the table are left. @toshitapandey, you can go ahead and create a PR for dropping the corresponding tables, and removing any reference to those tables in the codebase. Thank you, and sorry for the late response! |
As part of the #956 work, we should move the records for all DrupalFile entries into the node revision body. This will be similar to #4072, where we're getting rid of needlessly customized infrastructure and database tables, and just building the content into the node body content.
So we'd run a migration that'd run on each node, which would fetch
node.files
and for each one, add a link to the bottom of the node content, maybe in the format:This will allow us to remove these files:
https://github.com/publiclab/plots2/blob/master/app/models/drupal_file.rb
https://github.com/publiclab/plots2/blob/master/app/models/drupal_upload.rb
And make a migration to drop the corresponding tables.
We'd also get rid of these lines:
https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L79
plots2/app/models/node.rb
Lines 228 to 230 in 1ee4509
We'd love help with this!
The text was updated successfully, but these errors were encountered: