

def create_schema(db):
    'Creates the database schema.'
    schema_dir = pkg_resources.resource_filename('git_code_debt', 'schema')
    schema_files = os.listdir(schema_dir)
    for sql_file in schema_files:
        resource_filename = os.path.join(schema_dir, sql_file)
        with open(resource_filename, 'r') as resource:
            db.executescript(resource.read())

dataset/ETHPy150Open Yelp/git-code-debt/git_code_debt/create_tables.py create_schema/original