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
Maintenance:
20
    Archived imports:
21
        Back up: make backups/public.<date>.backup &
22
            Note: To back up the last import, you must archive it first (see 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 and rotate: make backups/vegbien.backup/rotate &
28
        Test: make backups/vegbien.<date>.backup/test &
29
        Restore: make backups/vegbien.<date>.backup/restore &
30

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

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

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

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

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