I am currently trying to inject a value and file into a user field called "field_user_pdf".
I am adding values to the following tables which is successful initally:
field_data_field_user_pdf
field_revision_field_user_pdf
file_managed
file_usage
The user is then able to see the file on their user profile. The user does not have permission to add/edit the file themselves, only an admin does, using the field_permissions
module.
However if they edit and save their profile, all record of the file is deleted from the database.
This behaviour does NOT occur if the file was added to the user by an admin in the CMS, it only occurs when the file is inserted in MySQL by circumventing Drupal.
I have come to the above tables by both scrutinizing MySQL Insert logs as well as MySQL Database Dump diffs before and after.
Is there a table or column I am overlooking? Is there any where I can view the SQL Schema for inserting SQL for file fields?