fud30_attach - fudforum/FUDforum GitHub Wiki

Description of FUDforum table fud30_attach. This table tracks files that are attached to messages. The Attachment Pruning ACP can be used to delete old attachments.

Fields

Column Name Datatype Can be Null? Key? Default Description
id int(11) NO PRI - auto_increment
location varchar(255) NO - - Full path to attachment on disk.
original_name varchar(255) YES - - Attachment's file name.
owner int(11) NO - 0 References fud30_users.id.
attach_opt int(11) NO - 0 Attachment options.
message_id int(11) NO MUL 0 References fud30_msg.id.
dlcount int(11) NO - 0 Download counter.
mime_type int(11) NO - 0 References fud30_mime.id.
fsize int(11) NO - 0 Attached file size.

Keys

Index Name Uniqueness Column Name Seq in index Comments
PRIMARY UNIQUE id 1
fud30_attach_i_mp NOT UNIQUE message_id 1
fud30_attach_i_mp NOT UNIQUE attach_opt 2

Migration

The location column contains the full path to the file on the server. This creates problems when moving FUDforum to a different server. To fix this, you will have to update the table manually, to change the path prefix. For example:

 CREATE TABLE fud30_attach_bck AS SELECT * FROM fud30_attach;
 UPDATE fud30_attach SET location=replace(location,'/var/www/vhosts/mysite.com/httpdocs','/home/mysite/htdocs/mysite.com');
⚠️ **GitHub.com Fallback** ⚠️