+#
+# Structure for table tt_files.
+# This table keeps file attachment information.
+#
+CREATE TABLE `tt_files` (
+ `id` int(10) unsigned NOT NULL auto_increment, # file id
+ `group_id` int(10) unsigned, # group id
+ `org_id` int(10) unsigned, # organization id
+ `remote_id` bigint(20) unsigned, # file id in storage facility
+ `entity_type` varchar(32), # type of entity file is associated with (project, task, etc.)
+ `entity_id` int(10) unsigned, # entity id
+ `file_name` varchar(80) COLLATE utf8mb4_bin NOT NULL, # file name
+ `description` varchar(255) default NULL, # file description
+ `created` datetime default NULL, # creation timestamp
+ `created_ip` varchar(45) default NULL, # creator ip
+ `created_by` int(10) unsigned, # creator user_id
+ `modified` datetime default NULL, # modification timestamp
+ `modified_ip` varchar(45) default NULL, # modifier ip
+ `modified_by` int(10) unsigned, # modifier user_id
+ `status` tinyint(1) default 1, # file status
+ PRIMARY KEY (`id`)
+);
+
+