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.

53 lines
1.9 KiB

  1. MySQL database "literature", table "depends"
  2. ============================================
  3. field names
  4. -----------
  5. fields available in table "depends" description
  6. ----------------------------------- -----------
  7. depends_id the unique ID number of this depends entry
  8. depends_external the unique name of the external utility that is required for a particular import or export format (specified in table 'formats')
  9. depends_enabled specifies globally whether the external utility is available and can be used ('true') or not ('false')
  10. depends_path the absolute path to the external utility
  11. column types
  12. ------------
  13. depends_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  14. depends_external VARCHAR(100)
  15. depends_enabled ENUM("true","false") NOT NULL
  16. depends_path VARCHAR(255)
  17. table creation code
  18. -------------------
  19. CREATE TABLE depends (depends_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, depends_external VARCHAR(100), depends_enabled ENUM("true","false") NOT NULL, depends_path VARCHAR(255));
  20. rules for data import
  21. ---------------------
  22. - fields are separated by tabs, records are separated by returns (if not specified otherwise within the LOAD DATA statement)
  23. - order of fields must resemble the above field order!
  24. - DATE format must be YYYY-MM-DD
  25. - TIME format must be HH:MM:SS
  26. - carriage returns *within* fields (ASCII character 11) must be replaced with a "UNIX return" (ASCII character 10) -> Search for: (\x0B) Replace with: \\n
  27. - empty fields are indicated by \N -> Search for: (?<=\t|^)(?=\t|$) Replace with: \\N
  28. - character encoding: higher ASCII chars must be encoded as ISO-8859-1
  29. - file encoding must be UNIX
  30. load data code
  31. --------------
  32. LOAD DATA LOCAL INFILE "/PATH/TO/FILE/depends.txt" INTO TABLE depends;
  33. or, alternatively, use something like the following from your shell:
  34. mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/depends.txt"