Skip to content

Commit

Permalink
Actually create the table before populating it
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Jul 3, 2024
1 parent e2f1d05 commit a179f7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ def _write_per_taxonomy_and_assembly_counts(self, session):
)
result = session.execute(query).fetchone()
if result:
taxonomy_assembly_row = result.RSCountPerAssembly
taxonomy_assembly_row = result.RSCountPerTaxonomyAssembly
else:
self.info(f"Create persistence for aggregate per assembly {assembly}")
taxonomy_assembly_row = RSCountPerAssembly(
self.info(f"Create persistence for aggregate per taxonomy {taxonomy} and assembly {assembly}")
taxonomy_assembly_row = RSCountPerTaxonomyAssembly(
taxonomy_id=taxonomy,
assembly_accession=assembly,
release_folder=species_assembly_annotations.get((taxonomy, assembly)).get('release_folder'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def get_sql_alchemy_engine(dbtype, username, password, host_url, database, port)
RSCountCategory.__table__.create(bind=engine, checkfirst=True)
RSCountPerAssembly.__table__.create(bind=engine, checkfirst=True)
RSCountPerTaxonomy.__table__.create(bind=engine, checkfirst=True)
RSCountPerTaxonomyAssembly.__table__.create(bind=engine, checkfirst=True)
return engine


Expand Down

0 comments on commit a179f7c

Please sign in to comment.