def initialize(self, name, reuse=False):
        """Create an empty Sorting Hat registry.

        This method creates a new database including the schema of Sorting Hat.
        Any attempt to create a new registry over an existing instance will
        produce an error, except if reuse=True. In that case, the
        database will be reused, assuming the database schema is correct
        (it won't be created in this case).

        :param  name: name of the database
        :param reuse: reuse database if it already exists
        """
        user = self._kwargs['user']
        password = self._kwargs['password']
        host = self._kwargs['host']
        port = self._kwargs['port']

        if '-' in name:
            self.error("dabase name '%s' cannot contain '-' characters" % name)
            return CODE_VALUE_ERROR

        try:
            Database.create(user, password, name, host, port)
            # Try to access and create schema
            db = Database(user, password, name, host, port)
            # Load countries list
            self.__load_countries(db)
        except DatabaseExists as e:
            if not reuse:
                self.error(str(e))
                return CODE_DATABASE_EXISTS
        except DatabaseError as e:
            self.error(str(e))
            return CODE_DATABASE_ERROR
        except LoadError as e:
            Database.drop(user, password, name, host, port)
            self.error(str(e))
            return CODE_LOAD_ERROR

        return CMD_SUCCESS
Create an empty Sorting Hat registry.

        This method creates a new database including the schema of Sorting Hat.
        Any attempt to create a new registry over an existing instance will
        produce an error, except if reuse=True. In that case, the
        database will be reused, assuming the database schema is correct
        (it won't be created in this case).

        :param  name: name of the database
        :param reuse: reuse database if it already exists