User:DWalden (WMF)/(Un)delete associated talk page

After delete

 * 1) Rows in the   table are copied into the   table
 * 2) Rows in the ,   and   tables are deleted
 * 3) Row in the   table is deleted
 * 4) Rows deleted from ,  ,  , if they existed in the first place
 * 5) Row inserted into   table which records the delete action
 * 6) If deleted page had rows in the   table (e.g. for edits), they are deleted
 * 7) Row inserted into   table which records the delete action

SQL queries
(see also API:Database_field_and_API_property_associations)
 * /sql_page
 * /sql_mcr (for the,   and   tables)

What happens when you delete a file
Files on MediaWiki also have a page associated with them (whose titles are prefixed with "File:" e.g. File:Page_UML_diagram.png). So, what is written above about pages also applies to files.

Moreover, there are three database tables:
 * , stores information about the most recent version of a file
 * , stores information about older versions of a file
 * , stores information on deleted files

When you delete

 * 1) Rows from   and   are copied to the   table
 * 2) Rows deleted from   and   tables
 * 3) In the filestore, the current and old versions of the file are moved to the

SQL queries

 * /sql_file