Installation: Install: make install WARNING: This will delete the current public schema of your VegBIEN DB! Uninstall: make uninstall WARNING: This will delete your entire VegBIEN DB! This includes all archived imports and staging tables. Data import: Import data into VegBIEN: . bin/import_all Using column-based import: . bin/with_all 'import by_col=1' Stop all running imports: . bin/stop_imports Archive the last import: make schemas/rotate Remove the last import: make schemas/public/reinstall WARNING: This will delete the current public schema of your VegBIEN DB! Re-import data: make schemas/rotate; . bin/import_all Note: This will archive the last import. Backups: After a new import: make schemas/rotate Rename the rotated schema using the date in the first datasource's log file name Delete previous imports so they won't bloat the full DB backup: make backups/public..backup/remove make backups/.backup/test & make backups/vegbien.backup/all & Archived imports: Back up: make backups/public..backup & Note: To back up the last import, you must archive it first (above) Test: make backups/public..backup/test & Restore: make backups/public..backup/restore & Remove: make backups/public..backup/remove Full DB: Back up, test, and rotate: make backups/vegbien.backup/all & Back up and rotate: make backups/vegbien.backup/rotate & Test: make backups/vegbien..backup/test & Restore: make backups/vegbien..backup/restore & Datasource setup: Add a new datasource: make inputs//add may not contain spaces, and should be abbreviated. If the datasource is a herbarium, should be the herbarium code as defined by the Index Herbariorum Populate the src/ subdir with input data: Obtain/create CSVs for the table(s) present in the datasource: specimens, plots, organisms, stems Rename each CSV so it ends in ".." (see tables above) Auto-create the map spreadsheets: make inputs//; make inputs// Note: Must be run twice to properly bootstrap all maps. svn add inputs//maps/{*.csv,.*.last_cleanup} Install the staging tables: make inputs//install quiet=1 & To view the log: tail -f inputs//import/install-
.log.sql Map each table's columns: In the maps/ subdir, for each "via map" of the form ".
.csv": Open the map in a spreadsheet editor In /mappings, open the corresponding "core map" of the form "-VegBIEN.
.csv" In each row of the via map, set the right column to a value from the left column of the core map Save Regenerate the derived maps: make inputs// Accept the test cases: make inputs//test/ When prompted to "Accept new test output", enter y and press ENTER svn add inputs//test/*.ref Commit: svn ci -m "Added inputs//" inputs// Update vegbiendev: On vegbiendev: svn up On local machine: make inputs/upload On vegbiendev: Follow the steps under Install the staging tables above Schema changes: Regenerate schema from installed DB: make schemas/remake Reinstall DB from schema: make schemas/reinstall WARNING: This will delete the current public schema of your VegBIEN DB! Reinstall errors tables: make inputs/install errors_table_only=1 Reinstall staging tables: . bin/reinstall_all Sync ERD with vegbien.sql schema: Run make schemas/vegbien.my.sql Open schemas/vegbien.ERD.mwb in MySQLWorkbench Go to File > Export > Synchronize With SQL CREATE Script... For Input File, select schemas/vegbien.my.sql Click Continue Click in the changes list and press Ctrl+A or Apple+A to select all Click Update Model Click Continue Note: The generated SQL script will be empty because we are syncing in the opposite direction Click Execute Reposition any lines that have been reset Add any new tables by dragging them from the Catalog in the left sidebar to the diagram Remove any deleted tables by right-clicking the table's diagram element, selecting Delete '
', and clicking Delete Save If desired, update the graphical ERD exports (see below) Update graphical ERD exports: Go to File > Export > Export as PNG... Select schemas/vegbien.ERD.png and click Save Go to File > Export > Export as SVG... Select schemas/vegbien.ERD.svg and click Save Go to File > Export > Export as Single Page PDF... Select schemas/vegbien.ERD.pdf and click Save Go to File > Print... For Pages, choose From 1 To 1 In the lower left corner, click PDF > Save as PDF... Set the Title and Author to "" Select schemas/vegbien.ERD.core.pdf and click Save Testing: Mapping process: make test Map spreadsheet generation: make remake Missing mappings: make missing_mappings Everything (for most complete coverage): make test-all Documentation: To generate a Redmine-formatted list of steps for column-based import: make inputs/QMOR/import/steps.by_col.sql General: To see a program's description, read its top-of-file comment To see a program's usage, run it without arguments To remake a directory: make /remake To remake a file: make -remake