Closed amyfromandi closed 2 months ago
For data validation summary with these scripts (see #60), can we print row counts, etc. as tables to improve readability (maybe using the rich
Python library)?
Removed v1 schlep scripts and moved all index files here schlep-index. Kept schlep scripts for tables that are modified in the pre/post migration scripts in case they are needed for future references i.e. the process scripts. remaining schlep scripts
These changes are referenced from #81
This branch contains migration code that enables a complete MariaDB to PostgreSQL database migration, as detailed in #60. The script in this pull request should make several key data evolutions:
macrostrat
MariaDB database to PostgreSQL, retaining all database tables, rows, etc.macrostrat_two
, currently) into Macrostrat's PostgreSQL database/macrostrat
schema, overwriting tables if neededRegenerate foreign keys from other schemas (e.g.,This has been moved to future work, based on some complexities identified by @mwestphall.maps
) as needed.A successful operation of this script will result in full integration of all data from MariaDB, allowing the Macrostrat API to operate off of a single PostgreSQL database (UW-Macrostrat/macrostrat-api#229)
Architecturally, this should be implemented within the
macrostrat
command-line application:macrostrat
subcommand, e.g.,macrostrat migrate-mariadb
(we can figure out the "right" name later)macrostrat.toml
rather than replicating them elsewheremacrostrat.database
module for running SQL commandsmacrostrat v1 schlep
scripts that were the initial version of this processLatest update:
compare_data_counts()
to compare any two databases passed through as parameters.Next steps: