File indexing completed on 2024-05-26 04:29:37

0001 CREATE TABLE IF NOT EXISTS resources (
0002     id INTEGER PRIMARY KEY   /* within this database, a unique and stable id for this resource */
0003 ,   resource_type_id INTEGER /* points to the type of this resource */
0004 ,   storage_id INTEGER       /* points to the storage object that contains the actual resource */
0005 ,   name TEXT NOT NULL       /* the untranslatable name of the resource */
0006 ,   filename TEXT NOT NULL   /* the filename of the resource RELATIVE to the storage path and resource type */
0007 ,   tooltip TEXT             /* a translated text that can be shown in the UI */
0008 ,   thumbnail BLOB           /* the image representing the resource visually*/
0009 ,   status INTEGER           /* active resources are visible in the UI, inactive resources are considered "deleted" */
0010 ,   temporary INTEGER        /* temporary resources are removed from the database on startup */
0011 ,   md5sum TEXT              /* the original md5sum of the first version of this resource */
0012 ,   FOREIGN KEY(resource_type_id) REFERENCES resource_types(id)
0013 ,   UNIQUE(storage_id, resource_type_id, filename)
0014 ,   UNIQUE(storage_id, resource_type_id, md5sum, filename)
0015 );