# 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
        current = 10
        if self.__is_version(db, current):
            self.__create_tags(db, tag_lists.tags_008)
            current += 1
            self.__update_version(db, current)

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

        # Version 12 -> 13
        current = 12

        # Finished
        db.close()

    def __create_db(self):
        """ Create database file if not existing. """
        if not os.path.exists(self.db_file):
            shutil.copy(self.home+self.EMPTY_DB_FILE, self.db_file)

    def __create_tags(self, db, tags):
        """ Create initial set of German and English tags. """
        for tag_names in tags:
            first = True
            parent_id = None
            for tag_name in tag_names:

# 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

        current = 10
        if self.__is_version(db, current):
            self.__create_tags(db, tag_lists.tags_008)
            current += 1
            self.__update_version(db, current)

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

        # Version 12 -> 13
        current = 12

        # Finished
        db.close()

    def __create_db(self):
        """ Create database file if not existing. """
        if not os.path.exists(self.db_file):
            shutil.copy(self.home+self.EMPTY_DB_FILE, self.db_file)

    def __create_tags(self, db, tags):
        """ Create initial set of German and English tags. """
        for tag_names in tags:
            first = True
            parent_id = None
            for tag_name in tag_names:

                tag = tag_entity.Tag(name=tag_name, synonym_of=parent_id)