# Path: entity/configuration.py
# class Configuration:
#     def __init__(self, id=None, name='', value=''):
#     def __str__(self):
#     def delete(self, db):
#     def find_all(db):
#     def find_name(db, name):
#     def find_pk(db, id):
#     def from_row(row):
#     def is_new(self):
#     def save(self, db):
#     def __generic_find(db, query, params):
# 
# Path: entity/tag.py
# class Tag:
#     def __init__(self, id=None, name='', synonym_of=None, synonyms=[]):
#     def __str__(self):
#     def delete(self, db):
#     def find_all(db):
#     def find_name(db, name):
#     def find_pk(db, id):
#     def find_recipe(db, recipe):
#     def find_synonyms(self, db):
#     def from_row(db, row, find_synonyms=True):
#     def is_new(self):
#     def name_exists(db, name):
#     def save(self, db):
#     def __generic_find(db, query, params):
# 
# Path: migration/tags.py



from entity import configuration as config_entity
from entity import tag as tag_entity
from migration import tags as tag_lists
import os
import shutil
import sqlite3
import sys
        """ Executes checks and migrates if necessary. Sub functions should
        always commit changes in the database. """
        # Version 1
        self.__create_db()
        db = sqlite3.connect(self.db_file)

        # Version 1 -> 2
        current = 1
        if self.__is_version(db, current):
            self.__create_tags(db, tag_lists.tags_001)
            current += 1
            self.__update_version(db, current)

        # Version 2 -> 3
        current = 2
        if self.__is_version(db, current):
            self.__tags_rename_vermouth(db)
            current += 1
            self.__update_version(db, current)

        # Version 3 -> 4
        current = 3
        if self.__is_version(db, current):
            self.__tags_rename_brackets(db)
            current += 1
            self.__update_version(db, current)
            
        # Version 4 -> 5
        current = 4
        if self.__is_version(db, current):

# Path: entity/configuration.py
# class Configuration:
#     def __init__(self, id=None, name='', value=''):
#     def __str__(self):
#     def delete(self, db):
#     def find_all(db):
#     def find_name(db, name):
#     def find_pk(db, id):
#     def from_row(row):
#     def is_new(self):
#     def save(self, db):
#     def __generic_find(db, query, params):
# 
# Path: entity/tag.py
# class Tag:
#     def __init__(self, id=None, name='', synonym_of=None, synonyms=[]):
#     def __str__(self):
#     def delete(self, db):
#     def find_all(db):
#     def find_name(db, name):
#     def find_pk(db, id):
#     def find_recipe(db, recipe):
#     def find_synonyms(self, db):
#     def from_row(db, row, find_synonyms=True):
#     def is_new(self):
#     def name_exists(db, name):
#     def save(self, db):
#     def __generic_find(db, query, params):
# 
# Path: migration/tags.py



# Path: migration/migration_manager.py
from entity import configuration as config_entity
from entity import tag as tag_entity
from migration import tags as tag_lists
import os
import shutil
import sqlite3
import sys

        """ Executes checks and migrates if necessary. Sub functions should
        always commit changes in the database. """
        # Version 1
        self.__create_db()
        db = sqlite3.connect(self.db_file)

        # Version 1 -> 2
        current = 1
        if self.__is_version(db, current):
            self.__create_tags(db, tag_lists.tags_001)
            current += 1
            self.__update_version(db, current)

        # Version 2 -> 3
        current = 2
        if self.__is_version(db, current):
            self.__tags_rename_vermouth(db)
            current += 1
            self.__update_version(db, current)

        # Version 3 -> 4
        current = 3
        if self.__is_version(db, current):
            self.__tags_rename_brackets(db)
            current += 1
            self.__update_version(db, current)
            
        # Version 4 -> 5
        current = 4
        if self.__is_version(db, current):

            self.__create_tags(db, tag_lists.tags_002)