protected function _renderCreateAbstract($tableName, array $fields, array $relations, $unique) {
        $lines      = array();

        foreach ($fields as $field) {
            $lines[] = Garp_Spawn_MySql_Column::renderFieldSql($field);
        }

        $primKeys = array();
        $uniqueKeys = array();

        if ($unique) {
            // This checks wether a single one-dimensional array is given: a collection of
            // columns combined into a unique key, or wether an array of arrays is given, meaning
            // multiple collections of columns combining into multiple unique keys per table.
            $isArrayOfArrays = count(array_filter($unique, 'is_array')) === count($unique);
            $unique = !$isArrayOfArrays ? array($unique) : $unique;
            $uniqueKeys = array_merge($uniqueKeys, $unique);
        }

        foreach ($fields as $field) {
            if ($field->primary)
                $primKeys[] = $field->name;
            if ($field->unique)
                $uniqueKeys[] = $field->name;
        }
        if ($primKeys) {
            $lines[] = Garp_Spawn_MySql_PrimaryKey::renderSqlDefinition($primKeys);
        }
        foreach ($uniqueKeys as $fieldName) {
            $lines[] = Garp_Spawn_MySql_UniqueKey::renderSqlDefinition($fieldName);
        }

        foreach ($relations as $rel) {
            if (($rel->type === 'hasOne' || $rel->type === 'belongsTo') && !$rel->multilingual) {
                $lines[] = Garp_Spawn_MySql_IndexKey::renderSqlDefinition($rel->column);
            }
        }

        //  set indices that were configured in the Spawn model config
        foreach ($fields as $field) {
            if ($field->index) {
                $lines[] = Garp_Spawn_MySql_IndexKey::renderSqlDefinition($field->name);
            }
        }

        foreach ($relations as $relName => $rel) {
            if (($rel->type === 'hasOne' || $rel->type === 'belongsTo') && !$rel->multilingual) {
                $fkName = Garp_Spawn_MySql_ForeignKey::generateForeignKeyName($tableName, $relName);
                $lines[] = Garp_Spawn_MySql_ForeignKey::renderSqlDefinition(
                    $fkName, $rel->column, $rel->model, $rel->type
                );
            }
        }

        $out = "CREATE TABLE `{$tableName}` (\n";
        $out.= implode(",\n", $lines);
        $out.= "\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;";

        return $out;
    }