from src.model.story_comment import StoryComment
from src.model.story import Story
from src.model.user import User
from src.utils.logger_config import Logger


def create_indexes():
    Logger(__name__).debug('Creating indexes for DB')

    # indexes for User
    User._get_coll().create_index("username")

    # indexes for Story
    Story._get_coll().create_index("username")

    # indexes for Comments
    StoryComment._get_coll().create_index("story_id")

09e214eadb26a2a477ab26e220ebb6200ec9d82c
<mask token>

<mask token>


def create_indexes():
    Logger(__name__).debug('Creating indexes for DB')
    User._get_coll().create_index('username')
    Story._get_coll().create_index('username')
    StoryComment._get_coll().create_index('story_id')

from src.model.story_comment import StoryComment
from src.model.story import Story
from src.model.user import User
from src.utils.logger_config import Logger


def create_indexes():
    Logger(__name__).debug('Creating indexes for DB')
    User._get_coll().create_index('username')
    Story._get_coll().create_index('username')
    StoryComment._get_coll().create_index('story_id')

from src.model.story_comment import StoryComment
from src.model.story import Story
from src.model.user import User
from src.utils.logger_config import Logger


def create_indexes():
    Logger(__name__).debug('Creating indexes for DB')

    # indexes for User
    User._get_coll().create_index("username")

    # indexes for Story
    Story._get_coll().create_index("username")

    # indexes for Comments
    StoryComment._get_coll().create_index("story_id")
