# 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
        """ Checks version in configuration table. """
        config = config_entity.Configuration.find_name(db, self.CONFIG_VERSION)
        return int(config.value) is version

    def __tags_rename_brackets(self, db):
        """ Correct brackets in tags. """
        tag = tag_entity.Tag.find_name(db, 'Paprika [Gewürz]')
        tag.name = 'Paprika (Gewürz)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Paprika [Spice]')
        tag.name = 'Paprika (Spice)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Rum [Dark]')
        tag.name = 'Rum (Dark)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Rum [Light]')
        tag.name = 'Rum (Light)'
        tag.save(db)

    def __tags_rename_vermouth(self, db):
        """ Correct brackets in vermouth. """
        tag = tag_entity.Tag.find_name(db, 'Vermouth [Dry')
        tag.name = 'Vermouth (Dry)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Vermouth [Sweet]')
        tag.name = 'Vermouth (Sweet)'
        tag.save(db)

    def __update_version(self, db, version):
        """ Sets version in configuration table to given value. """

# 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

        """ Checks version in configuration table. """
        config = config_entity.Configuration.find_name(db, self.CONFIG_VERSION)
        return int(config.value) is version

    def __tags_rename_brackets(self, db):
        """ Correct brackets in tags. """
        tag = tag_entity.Tag.find_name(db, 'Paprika [Gewürz]')
        tag.name = 'Paprika (Gewürz)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Paprika [Spice]')
        tag.name = 'Paprika (Spice)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Rum [Dark]')
        tag.name = 'Rum (Dark)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Rum [Light]')
        tag.name = 'Rum (Light)'
        tag.save(db)

    def __tags_rename_vermouth(self, db):
        """ Correct brackets in vermouth. """
        tag = tag_entity.Tag.find_name(db, 'Vermouth [Dry')
        tag.name = 'Vermouth (Dry)'
        tag.save(db)
        tag = tag_entity.Tag.find_name(db, 'Vermouth [Sweet]')
        tag.name = 'Vermouth (Sweet)'
        tag.save(db)

    def __update_version(self, db, version):
        """ Sets version in configuration table to given value. """

        config = config_entity.Configuration.find_name(db, self.CONFIG_VERSION)