Inject a file record through SQL 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?
What you are doing, sorry, is plain wrong. There is a field API and you should use it instead of messing around with the SQL tables. If you are going around the field API and it breaks, you truly get to keep both parts. I find it astonishing you expect support for going around such a complex API.