Project

General

Profile

1
Installation:
2
    Install: make install
3
        WARNING: This will delete the current public schema of your VegBIEN DB!
4
    Uninstall: make uninstall
5
        WARNING: This will delete your entire VegBIEN DB!
6
        This includes all archived imports and staging tables.
7
    Reinstall all datasources at once: . bin/reinstall_all
8

    
9
Data import:
10
    Import data into VegBIEN: . bin/import_all
11
        Using column-based import: . bin/with_all 'import by_col=1'
12
    Stop all running imports: . bin/stop_imports
13
    Archive the last import: make schemas/rotate
14
    Remove the last import: make schemas/public/reinstall
15
        WARNING: This will delete the current public schema of your VegBIEN DB!
16
    Re-import data: make schemas/rotate; . bin/import_all
17
        Note: This will archive the last import.
18

    
19
Backups:
20
    Archived imports:
21
        Back up: make backups/public.<date>.backup &
22
            Note: To back up the last import, you must archive it first (above)
23
        Test: make backups/public.<date>.backup/test &
24
        Restore: make backups/public.<date>.backup/restore &
25
        Remove: make backups/public.<date>.backup/remove
26
    Full DB:
27
        Back up, test, and rotate: make backups/vegbien.backup/all &
28
        Back up and rotate: make backups/vegbien.backup/rotate &
29
        Test: make backups/vegbien.<date>.backup/test &
30
        Restore: make backups/vegbien.<date>.backup/restore &
31

    
32
Datasource setup:
33
    Add a new datasource: make inputs/<short_name>/add
34
        If the datasource is a herbarium, <short_name> should be the herbarium
35
        code as defined by the Index Herbariorum <http://sweetgum.nybg.org/ih/>
36

    
37
Schema changes:
38
    Regenerate schema from installed DB: make schemas/remake
39
    Reinstall DB from schema: make schemas/reinstall
40
        WARNING: This will delete the current public schema of your VegBIEN DB!
41
    Reinstall errors tables: make inputs/install errors_table_only=1
42
    Sync ERD with vegbien.sql schema:
43
        Run make schemas/vegbien.my.sql
44
        Open schemas/vegbien.ERD.mwb in MySQLWorkbench
45
        Go to File > Export > Synchronize With SQL CREATE Script...
46
        For Input File, select schemas/vegbien.my.sql
47
        Click Continue
48
        Click in the changes list and press Ctrl+A or Apple+A to select all
49
        Click Update Model
50
        Click Continue
51
        Note: The generated SQL script will be empty because we are syncing in
52
            the opposite direction
53
        Click Execute
54
        Reposition any lines that have been reset
55
        Add any new tables by dragging them from the Catalog in the left sidebar
56
            to the diagram
57
        Remove any deleted tables by right-clicking the table's diagram element,
58
            selecting Delete '<table name>', and clicking Delete
59
        Save
60
        If desired, update the graphical ERD exports (see below)
61
    Update graphical ERD exports:
62
        Go to File > Export > Export as PNG...
63
        Select schemas/vegbien.ERD.png and click Save
64
        Go to File > Export > Export as SVG...
65
        Select schemas/vegbien.ERD.svg and click Save
66
        Go to File > Export > Export as Single Page PDF...
67
        Select schemas/vegbien.ERD.pdf and click Save
68
        Go to File > Print...
69
        For Pages, choose From 1 To 1
70
        In the lower left corner, click PDF > Save as PDF...
71
        Set the Title and Author to ""
72
        Select schemas/vegbien.ERD.core.pdf and click Save
73

    
74
Testing:
75
    Mapping process: make test
76
    Map spreadsheet generation: make remake
77
    Missing mappings: make missing_mappings
78
    Everything (for most complete coverage): make test-all
79

    
80
Documentation:
81
    To generate a Redmine-formatted list of steps for column-based import:
82
        make inputs/QMOR/import/steps.by_col.sql
83

    
84
General:
85
    To see a program's description, read its top-of-file comment
86
    To see a program's usage, run it without arguments
87
    To remake a directory: make <dir>/remake
88
    To remake a file: make <file>-remake
(2-2/3)