USE internationaliser;
/**
 * taskitems, the pieces of work that make up a task, e.g. translate one string or one bundle.
 */
DROP TABLE IF EXISTS taskitems;
CREATE TABLE taskitems  (
  /**
   * the task number this item is part of
   */
  uniqueTaskID INTEGER NOT NULL,
  /**
   * a unique serial number assigned to each unique combination
   * of uniqueProjectID/bundlename/language/country
   */
   uniqueBundleID INTEGER NOT NULL,
   /**
    * the key the Java source program uses to tie together all the translations bundlename.getString( "key" )
    * If blank it means the entire bundle is part of the task.
    * Dots in the key indicate levels of hierarchy.
    */
   translationKey VARCHAR( 100 ) NOT NULL,
   /**
    * assigments are pairs of uniqueBundleID, initials.
    */
   PRIMARY KEY( uniqueTaskID, uniqueBundleID, translationKey ),
   FOREIGN KEY( uniqueTaskID ) REFERENCES tasks( uniqueTaskID ),
   FOREIGN KEY( uniqueBundleID ) REFERENCES bundles( uniqueBundleID )
   );