glamod / glamod-ingest

Database preparation and ingestion for GLAMOD
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Re-factor database creation code to support explicit version in schemas #6

Closed agstephens closed 4 years ago

agstephens commented 4 years ago

Proposed improvement for Ansible playbook to create/update the database:

  1. All tables live under their own schema (so nothing at the top-level). Schema names:

    • v1_lite
    • v1_full
    • v2_lite
    • v2_full
  2. The playbook should have a variable to define a list of versions, and then will create the schemas and tables for each.

  3. Playbook should create, for both full and lite:

    • all partitions
    • all triggers
    • all indexes
    • all postgtres users (based on playbook variables)
  4. Playbook should include tasks to do repeatable operations such as:

    • sorting (i.e. clustering) of each table (partition)