You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below are the defined enum types within Mariadb. These need to be reviewed to improve the database structure after the Mariadb to Postgresql migration. You can use the query below to pull the enum types that pgloader generated within Postgresql and compare.
enum('','North America','New Zealand','Deep Sea','Australia','Caribbean','South America','Africa','North American Ediacaran','North American Cretaceous','Indonesia','eODP','Northern Eurasia')
refs
compilation_code
enum('','COSUNA','COSUNA II','Canada','GNS Folio Series 1')
rockd_features
feature_class
enum('','structure','geomorphology')
rockd_features
feature_type
enum('','fault','glacial','deformation')
stats
project
enum('','North America','New Zealand','Deep Sea','Australia','Caribbean','South America','Africa','North American Ediacaran','North American Cretaceous','Indonesia','eODP','Northern Eurasia')
SELECT c.table_schema,
c.table_name,
c.column_name,
c.data_type,
c.udt_name AS enum_name
FROM information_schema.columns c
WHERE c.udt_name IN (
SELECT t.typname
FROM pg_type t
JOIN pg_enum e ON t.oid = e.enumtypid
JOIN pg_namespace n ON n.oid = t.typnamespace
WHERE n.nspname = 'macrostrat'
) AND table_schema = 'macrostrat'
ORDER BY c.table_name, c.column_name ASC
The text was updated successfully, but these errors were encountered:
Just to add – most of these appear to have imported cleanly into the macrostrat schema in PostgreSQL. However, there are some duplicates, mostly from similar tables (e.g., backups of unit_boundaries, etc.) getting duplicate types.
The biggest problem here seems to be the inclusion of the empty strings in most enum types. These mostly appear to be pseudo-nulls and it would be better to be more explicit.
Below are the defined enum types within Mariadb. These need to be reviewed to improve the database structure after the Mariadb to Postgresql migration. You can use the query below to pull the enum types that pgloader generated within Postgresql and compare.
Postgresql enum types:
The text was updated successfully, but these errors were encountered: