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
    After a new import:
21
        make schemas/rotate
22
        Rename the rotated schema using the date in the first datasource's log
23
            file name
24
        Delete previous imports so they won't bloat the full DB backup:
25
            make backups/public.<date>.backup/remove
26
        make backups/<schema>.backup/test & make backups/vegbien.backup/all &
27
    Archived imports:
28
        Back up: make backups/public.<date>.backup &
29
            Note: To back up the last import, you must archive it first (above)
30
        Test: make backups/public.<date>.backup/test &
31
        Restore: make backups/public.<date>.backup/restore &
32
        Remove: make backups/public.<date>.backup/remove
33
    Full DB:
34
        Back up, test, and rotate: make backups/vegbien.backup/all &
35
        Back up and rotate: make backups/vegbien.backup/rotate &
36
        Test: make backups/vegbien.<date>.backup/test &
37
        Restore: make backups/vegbien.<date>.backup/restore &
38

    
39
Datasource setup:
40
    Add a new datasource: make inputs/<short_name>/add
41
        If the datasource is a herbarium, <short_name> should be the herbarium
42
        code as defined by the Index Herbariorum <http://sweetgum.nybg.org/ih/>
43

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

    
81
Testing:
82
    Mapping process: make test
83
    Map spreadsheet generation: make remake
84
    Missing mappings: make missing_mappings
85
    Everything (for most complete coverage): make test-all
86

    
87
Documentation:
88
    To generate a Redmine-formatted list of steps for column-based import:
89
        make inputs/QMOR/import/steps.by_col.sql
90

    
91
General:
92
    To see a program's description, read its top-of-file comment
93
    To see a program's usage, run it without arguments
94
    To remake a directory: make <dir>/remake
95
    To remake a file: make <file>-remake
(2-2/3)