Skip to content

Commit

Permalink
Workaround to query ENA / ERAPRO Views.
Browse files Browse the repository at this point in the history
ERA needs to be appended as the default connection tries to use
the PUBLIC SYNONYM (according to ENA) and it's not working ATM
we were advised to prefix the views and this is the simplest way.
The short-term plan is to remove the dependency of ENA databases
  • Loading branch information
mberacochea committed Oct 31, 2023
1 parent 138a466 commit aa052b6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions emgena/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,20 @@ class Meta:

class RunStudy(StudyAbstract):
class Meta(StudyAbstract.Meta):
db_table = 'V_MGP_RUN_STUDY'
# ERA needs to be appended as the default connection tries to use
# the PUBLIC SYNONYM (according to ENA) and it's not working ATM
# we were advised to prefix the views and this is the simplest way.
# The short-term plan is to remove the dependency of ENA databases
db_table = 'ERA\".\"V_MGP_RUN_STUDY'


class AssemblyStudy(StudyAbstract):
class Meta(StudyAbstract.Meta):
db_table = 'V_MGP_ASSEMBLY_STUDY'
# ERA needs to be appended as the default connection tries to use
# the PUBLIC SYNONYM (according to ENA) and it's not working ATM
# we were advised to prefix the views and this is the simplest way.
# The short-term plan is to remove the dependency of ENA databases
db_table = 'ERA\".\"V_MGP_ASSEMBLY_STUDY'


class Project(models.Model):
Expand Down

0 comments on commit aa052b6

Please sign in to comment.