protected function createRelations()
    {
        foreach($this->schema['relations'] as $table => $many) {
            $this->database->query('DROP TABLE IF EXISTS `'.$this->schema['name'].'_'.$table.'`');

            $this->database->query('CREATE TABLE `'.$this->schema['name'].'_'.$table.'` (
              `'.$this->schema['name'].'_'.$table.'_'.$this->schema['name'].'` int(10) unsigned NOT NULL,
              `'.$this->schema['name'].'_'.$table.'_'.$table.'` int(10) unsigned NOT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8');

            $this->database->query('ALTER TABLE `'
                . $this->schema['name'] . '_' . $table . '`'
                 . 'ADD PRIMARY KEY (`'
                . $this->schema['name'] . '_' . $table . '_' . $this->schema['name'] . '`,`'
                . $this->schema['name'] . '_' . $table . '_' . $table . '`), '
                . 'ADD KEY `' . $table . '_id_idx` (`'
                . $this->schema['name'] . '_' . $table . '_' . $table . '`)');
        }

        return $this;
    }