Rev 111 | Rev 511 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
73 | daniel-mar | 1 | #!/bin/bash |
2 | |||
239 | daniel-mar | 3 | # Export tables "demo_*" into file setup/sql/example_mysql.sql |
111 | daniel-mar | 4 | # We don't print to console because of encoding issues |
239 | daniel-mar | 5 | mysqldump --default-character-set=utf8 --no-create-info --extended-insert=FALSE oidplus demo_iri demo_asn1id demo_ra demo_objects -r ../setup/sql/example_mysql.sql |
73 | daniel-mar | 6 | |
111 | daniel-mar | 7 | # Remove database prefix |
239 | daniel-mar | 8 | sed -i 's/`demo_/`/g' ../setup/sql/example_mysql.sql |
73 | daniel-mar | 9 | |
111 | daniel-mar | 10 | # Avoid that there is a conflict with well known IDs (e.g. 2.999) |
239 | daniel-mar | 11 | sed -i 's/INSERT INTO `iri`/INSERT IGNORE INTO `iri`/g' ../setup/sql/example_mysql.sql |
12 | sed -i 's/INSERT INTO `asn1id`/INSERT IGNORE INTO `asn1id`/g' ../setup/sql/example_mysql.sql |