You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.4 KiB

  1. MySQL database "literature", table "styles"
  2. ===========================================
  3. field names
  4. -----------
  5. fields available in table "styles" description
  6. ---------------------------------- -----------
  7. style_id the unique ID number of this citation style entry
  8. style_name the display name of this citation style as it occurs within the styles popup
  9. style_enabled specifies globally whether the referenced citation style can be displayed within the styles popup ('true') [if a user chooses so] or not ('false')
  10. style_spec the unique name of the file holding the citation function that will output this citation style (style files must be located within the 'cite' directory)
  11. order_by a string that specifies the primary sort order for this entry (secondary sort order is by style name)
  12. depends_id the unique ID number of the referenced external utility that's required for this style (the ID corresponds to the depends_id number of the utility's entry within the "depends" table)
  13. column types
  14. ------------
  15. style_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  16. style_name VARCHAR(100)
  17. style_enabled ENUM("true","false") NOT NULL
  18. style_spec VARCHAR(255)
  19. order_by VARCHAR(25)
  20. depends_id MEDIUMINT UNSIGNED NOT NULL
  21. INDEX (style_name)
  22. table creation code
  23. -------------------
  24. CREATE TABLE styles (style_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, style_name VARCHAR(100), style_enabled ENUM("true","false") NOT NULL, style_spec VARCHAR(255), order_by VARCHAR(25), depends_id MEDIUMINT UNSIGNED NOT NULL, INDEX (style_name));
  25. rules for data import
  26. ---------------------
  27. - fields are separated by tabs, records are separated by returns (if not specified otherwise within the LOAD DATA statement)
  28. - order of fields must resemble the above field order!
  29. - DATE format must be YYYY-MM-DD
  30. - TIME format must be HH:MM:SS
  31. - carriage returns *within* fields (ASCII character 11) must be replaced with a "UNIX return" (ASCII character 10) -> Search for: (\x0B) Replace with: \\n
  32. - empty fields are indicated by \N -> Search for: (?<=\t|^)(?=\t|$) Replace with: \\N
  33. - character encoding: higher ASCII chars must be encoded as ISO-8859-1
  34. - file encoding must be UNIX
  35. load data code
  36. --------------
  37. LOAD DATA LOCAL INFILE "/PATH/TO/FILE/styles.txt" INTO TABLE styles;
  38. or, alternatively, use something like the following from your shell:
  39. mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/styles.txt"