コード例 #1
0
def create_tables():
    """Create the database tables."""
    from redash.models import db
    db.create_all()

    # Need to mark current DB as up to date
    stamp()
コード例 #2
0
ファイル: database.py プロジェクト: Captricity/redash
def create_tables():
    """Create the database tables."""
    from redash.models import db
    db.create_all()

    # Need to mark current DB as up to date
    stamp()
コード例 #3
0
ファイル: database.py プロジェクト: harshitgupta/redash_7t
def create_tables():
    """Create the database tables."""
    from redash.models import db

    _wait_for_db_connection(db)
    db.create_all()

    # Need to mark current DB as up to date
    stamp()
コード例 #4
0
def create_tables():
    """Create the database tables."""
    from redash.models import db

    _wait_for_db_connection(db)
    # To create triggers for searchable models, we need to call configure_mappers().
    sqlalchemy.orm.configure_mappers()
    db.create_all()

    # Need to mark current DB as up to date
    stamp()
コード例 #5
0
ファイル: __init__.py プロジェクト: co-l-der/Redash
 def setUp(self):
     self.app = create_app()
     self.db = db
     self.app.config['TESTING'] = True
     self.app_ctx = self.app.app_context()
     self.app_ctx.push()
     db.session.close()
     db.drop_all()
     db.create_all()
     self.factory = Factory()
     self.client = self.app.test_client()
コード例 #6
0
ファイル: database.py プロジェクト: ariarijp/redash
def create_tables():
    """Create the database tables."""
    from redash.models import db

    _wait_for_db_connection(db)
    # To create triggers for searchable models, we need to call configure_mappers().
    sqlalchemy.orm.configure_mappers()
    db.create_all()

    # Need to mark current DB as up to date
    stamp()
コード例 #7
0
ファイル: __init__.py プロジェクト: ezioavi42/redash
 def setUp(self):
     self.app = create_app()
     self.db = db
     self.app.config['TESTING'] = True
     self.app_ctx = self.app.app_context()
     self.app_ctx.push()
     db.session.close()
     db.drop_all()
     db.create_all()
     self.factory = Factory()
     self.client = self.app.test_client()
コード例 #8
0
 def setUp(self):
     self.app = create_app()
     self.db = db
     self.app.config['TESTING'] = True
     self.app.config['SERVER_NAME'] = 'localhost'
     limiter.enabled = False
     self.app_ctx = self.app.app_context()
     self.app_ctx.push()
     db.session.close()
     db.drop_all()
     db.create_all()
     self.factory = Factory()
     self.client = self.app.test_client()
コード例 #9
0
ファイル: __init__.py プロジェクト: getredash/redash
 def setUp(self):
     self.app = create_app()
     self.db = db
     self.app.config['TESTING'] = True
     self.app.config['SERVER_NAME'] = 'localhost'
     limiter.enabled = False
     self.app_ctx = self.app.app_context()
     self.app_ctx.push()
     db.session.close()
     db.drop_all()
     db.create_all()
     self.factory = Factory()
     self.client = self.app.test_client()
コード例 #10
0
def create_tables():
    """Create the database tables."""
    from redash.models import db

    _wait_for_db_connection(db)

    # We need to make sure we run this only if the DB is empty, because otherwise calling
    # stamp() will stamp it with the latest migration value and migrations won't run.
    if is_db_empty():
        load_extensions(db)

        # To create triggers for searchable models, we need to call configure_mappers().
        sqlalchemy.orm.configure_mappers()
        db.create_all()

        # Need to mark current DB as up to date
        stamp()