|
MySQL database "literature", table "user_options"
|
|
=================================================
|
|
|
|
field names
|
|
-----------
|
|
|
|
fields available in table "user_options" description
|
|
---------------------------------------- -----------
|
|
|
|
option_id the unique ID number of this user option entry
|
|
user_id the user's unique ID number (which corresponds to the user_id number of the user's record entry within the 'users' table)
|
|
export_cite_keys controls whether to include cite keys on export or not
|
|
autogenerate_cite_keys controls whether cite keys will be auto-generated on export
|
|
prefer_autogenerated_cite_keys controls whether auto-generated cite keys will overwrite record-specific contents from the user-specific 'cite_key' field on export
|
|
use_custom_cite_key_format controls whether the user's custom cite key format shall be used (instead of the default cite key format provided by the admin)
|
|
cite_key_format the user's custom cite key format
|
|
uniquify_duplicate_cite_keys controls whether to add incrementing numbers to any duplicate cite keys
|
|
nonascii_chars_in_cite_keys controls how non-ASCII characters will be treated in cite keys (keep empty in order to use site default)
|
|
use_custom_text_citation_format controls whether the user's custom text citation format shall be used (instead of the default text citation format provided by the admin)
|
|
text_citation_format the user's custom text citation format
|
|
|
|
|
|
|
|
column types
|
|
------------
|
|
|
|
option_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
|
|
user_id MEDIUMINT UNSIGNED NOT NULL
|
|
export_cite_keys ENUM('yes','no') NOT NULL
|
|
autogenerate_cite_keys ENUM('yes','no') NOT NULL
|
|
prefer_autogenerated_cite_keys ENUM('no','yes') NOT NULL
|
|
use_custom_cite_key_format ENUM('no','yes') NOT NULL
|
|
cite_key_format VARCHAR(255)
|
|
uniquify_duplicate_cite_keys ENUM('yes','no') NOT NULL
|
|
nonascii_chars_in_cite_keys ENUM('transliterate','strip','keep')
|
|
use_custom_text_citation_format ENUM('no','yes') NOT NULL
|
|
text_citation_format VARCHAR(255)
|
|
|
|
INDEX (user_id)
|
|
|
|
|
|
|
|
table creation code
|
|
-------------------
|
|
|
|
CREATE TABLE user_options (option_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id MEDIUMINT UNSIGNED NOT NULL, export_cite_keys ENUM('yes','no') NOT NULL, autogenerate_cite_keys ENUM('yes','no') NOT NULL, prefer_autogenerated_cite_keys ENUM('no','yes') NOT NULL, use_custom_cite_key_format ENUM('no','yes') NOT NULL, cite_key_format VARCHAR(255), uniquify_duplicate_cite_keys ENUM('yes','no') NOT NULL, nonascii_chars_in_cite_keys ENUM('transliterate','strip','keep'), use_custom_text_citation_format ENUM('no','yes') NOT NULL, text_citation_format VARCHAR(255), INDEX (user_id));
|
|
|
|
|
|
rules for data import
|
|
---------------------
|
|
- fields are separated by tabs, records are separated by returns (if not specified otherwise within the LOAD DATA statement)
|
|
- order of fields must resemble the above field order!
|
|
- DATE format must be YYYY-MM-DD
|
|
- TIME format must be HH:MM:SS
|
|
- carriage returns *within* fields (ASCII character 11) must be replaced with a "UNIX return" (ASCII character 10) -> Search for: (\x0B) Replace with: \\n
|
|
- empty fields are indicated by \N -> Search for: (?<=\t|^)(?=\t|$) Replace with: \\N
|
|
- character encoding: higher ASCII chars must be encoded as ISO-8859-1
|
|
- file encoding must be UNIX
|
|
|
|
|
|
load data code
|
|
--------------
|
|
|
|
LOAD DATA LOCAL INFILE "/PATH/TO/FILE/user_options.txt" INTO TABLE user_options;
|
|
|
|
or, alternatively, use something like the following from your shell:
|
|
|
|
mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/user_options.txt"
|
|
|