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.
 
 
 
 
 
 

55 lines
2.1 KiB

MySQL database "literature", table "user_styles"
================================================
field names
-----------
fields available in table "user_styles" description
--------------------------------------- -----------
user_style_id the unique ID number of this user style entry
style_id the unique ID number of the referenced citation style (which corresponds to the style_id number of the style's entry within the "citation_styles" table)
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)
show_style specifies whether the referenced citation style will be displayed within the styles popup ('true') or not ('false')
column types
------------
user_style_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
style_id MEDIUMINT UNSIGNED NOT NULL
user_id MEDIUMINT UNSIGNED NOT NULL
show_style ENUM("true","false") NOT NULL
INDEX (style_id,user_id)
table creation code
-------------------
CREATE TABLE user_styles (user_style_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, style_id MEDIUMINT UNSIGNED NOT NULL, user_id MEDIUMINT UNSIGNED NOT NULL, show_style ENUM("true","false") NOT NULL, INDEX (style_id,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_styles.txt" INTO TABLE user_styles;
or, alternatively, use something like the following from your shell:
mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/user_styles.txt"