Ejemplo n.º 1
0
 def create_tables(self):
     '''
     Create all Codalab bundle tables if they do not already exist.
     '''
     # TODO(skishore): This hack is a mini-migration that should stay here until
     # the bundle dependency table has been renamed in all CodaLab deployments.
     # After that point, it should be deleted.
     try:
         with self.engine.begin() as connection:
             connection.execute('ALTER TABLE dependency RENAME TO bundle_dependency')
     except (OperationalError, ProgrammingError):
         # sqlite throws an OperationalError, MySQL a ProgrammingError. Ugh.
         pass
     db_metadata.create_all(self.engine)
Ejemplo n.º 2
0
 def create_tables(self):
     '''
     Create all CodaLab bundle tables if they do not already exist.
     '''
     db_metadata.create_all(self.engine)
     self._create_default_groups()
Ejemplo n.º 3
0
 def create_tables(self):
   '''
   Create all Codalab bundle tables if they do not already exist.
   '''
   db_metadata.create_all(self.engine)