Schema generation
Schema was generated by:
- Write OA v1 tables
dbconn <- DBI::dbConnect(
drv = RPostgres::Postgres(),
dbname = "tidywigits",
user = "user1"
)
oa <- Wigits$new("nogit/oa_v1")
oa$run(format = "db", input_id = "oa_run_v1", dbconn = dbconn)
DBI::dbDisconnect(dbconn)pg_dump --schema-only tidywigits > schema_oa_v1.txt
dropdb --force tidywigits
createdb tidywigits
- Write OA v2 tables
dbconn <- DBI::dbConnect(
drv = RPostgres::Postgres(),
dbname = "tidywigits",
user = "user1"
)
oa <- Wigits$new("nogit/oa_v2")
oa$run(format = "db", input_id = "oa_run_v2", dbconn = dbconn)
DBI::dbDisconnect(dbconn)pg_dump --schema-only tidywigits > schema_oa_v2.txt
dropdb --force tidywigits
- Merge schemas
After diffing the two schemas a merged one was (manually) created.
Database creation
createdb tidywigits
cat schema1.sql | psql tidywigits
Result
select * from pg_catalog.pg_tables where schemaname='public';
schemaname │ tablename │ tableowner │ tablespace │ hasindexes │ hasrules │ hastriggers │ rowsecurity
════════════╪═════════════════════════════╪════════════╪════════════╪════════════╪══════════╪═════════════╪═════════════
public │ amber_contaminationtsv │ user │ ¤ │ f │ f │ f │ f
public │ alignments_dupfreq │ user │ ¤ │ f │ f │ f │ f
public │ virusinterpreter_annotated │ user │ ¤ │ f │ f │ f │ f
(X rows)
