
/*
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */


#include "akonadischema.h"

using namespace Akonadi::Server;

QVector<TableDescription> AkonadiSchema::tables()
{
  QVector<TableDescription> tabs;
  tabs.reserve(13);
  
  {
    TableDescription t;
    t.name = QLatin1String("SchemaVersionTable");

    t.columns.reserve(1);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("version");
      c.type = QLatin1String("int");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("0");
      

      t.columns.push_back(c);
    }
    
      t.data.reserve(1);
      
      {
        const QStringList columns = QString::fromLatin1("version").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        const QStringList values = QString::fromLatin1("29").split( QLatin1Char( ',' ), QString::SkipEmptyParts );

        Q_ASSERT( columns.count() == values.count() );

        DataDescription d;
        d.data.reserve(columns.size());
        for ( int i = 0; i < columns.size(); ++i )
          d.data.insert( columns.at( i ), values.at( i ) );

        t.data.push_back(d);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("ResourceTable");

    t.columns.reserve(3);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      
      c.isUnique = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("isVirtual");
      c.type = QLatin1String("bool");
      
      c.defaultValue = QLatin1String("false");
      

      t.columns.push_back(c);
    }
    
      t.data.reserve(1);
      
      {
        const QStringList columns = QString::fromLatin1("name,isVirtual").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        const QStringList values = QString::fromLatin1("'akonadi_search_resource',true").split( QLatin1Char( ',' ), QString::SkipEmptyParts );

        Q_ASSERT( columns.count() == values.count() );

        DataDescription d;
        d.data.reserve(columns.size());
        for ( int i = 0; i < columns.size(); ++i )
          d.data.insert( columns.at( i ), values.at( i ) );

        t.data.push_back(d);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("CollectionTable");

    t.columns.reserve(20);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("remoteId");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("remoteRevision");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("parentId");
      c.type = QLatin1String("qint64");
      
      c.refTable = QLatin1String("Collection");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("resourceId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("Resource");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("enabled");
      c.type = QLatin1String("bool");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("true");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("syncPref");
      c.type = QLatin1String("Tristate");
      
      c.defaultValue = QLatin1String("Tristate::Undefined");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("displayPref");
      c.type = QLatin1String("Tristate");
      
      c.defaultValue = QLatin1String("Tristate::Undefined");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("indexPref");
      c.type = QLatin1String("Tristate");
      
      c.defaultValue = QLatin1String("Tristate::Undefined");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("referenced");
      c.type = QLatin1String("bool");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("false");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("cachePolicyInherit");
      c.type = QLatin1String("bool");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("true");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("cachePolicyCheckInterval");
      c.type = QLatin1String("int");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("-1");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("cachePolicyCacheTimeout");
      c.type = QLatin1String("int");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("-1");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("cachePolicySyncOnDemand");
      c.type = QLatin1String("bool");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("false");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("cachePolicyLocalParts");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("queryString");
      c.type = QLatin1String("QString");
      
      c.size = 32768;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("queryAttributes");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("queryCollections");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("isVirtual");
      c.type = QLatin1String("bool");
      
      c.defaultValue = QLatin1String("false");
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(5);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("parentAndNameIndex");
        idx.columns = QString::fromLatin1("parentId,name").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = true;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("enabledIndex");
        idx.columns = QString::fromLatin1("enabled").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("syncPrefIndex");
        idx.columns = QString::fromLatin1("syncPref").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("displayPrefIndex");
        idx.columns = QString::fromLatin1("displayPref").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("indexPrefIndex");
        idx.columns = QString::fromLatin1("indexPref").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      t.data.reserve(1);
      
      {
        const QStringList columns = QString::fromLatin1("parentId,name,resourceId,isVirtual").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        const QStringList values = QString::fromLatin1("NULL,'Search',1,true").split( QLatin1Char( ',' ), QString::SkipEmptyParts );

        Q_ASSERT( columns.count() == values.count() );

        DataDescription d;
        d.data.reserve(columns.size());
        for ( int i = 0; i < columns.size(); ++i )
          d.data.insert( columns.at( i ), values.at( i ) );

        t.data.push_back(d);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("MimeTypeTable");

    t.columns.reserve(2);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      
      c.isUnique = true;
      

      t.columns.push_back(c);
    }
    

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("PimItemTable");

    t.columns.reserve(11);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("rev");
      c.type = QLatin1String("int");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("0");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("remoteId");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("remoteRevision");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("gid");
      c.type = QLatin1String("QString");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("collectionId");
      c.type = QLatin1String("qint64");
      
      c.refTable = QLatin1String("Collection");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("mimeTypeId");
      c.type = QLatin1String("qint64");
      
      c.refTable = QLatin1String("MimeType");
      
      c.refColumn = QLatin1String("id");
      
      c.onDelete = ColumnDescription::Restrict;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("datetime");
      c.type = QLatin1String("QDateTime");
      
      c.defaultValue = QLatin1String("QDateTime::currentDateTime()");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("atime");
      c.type = QLatin1String("QDateTime");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("dirty");
      c.type = QLatin1String("bool");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("size");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.defaultValue = QLatin1String("0");
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(3);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("collectionIndex");
        idx.columns = QString::fromLatin1("collectionId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("gidIndex");
        idx.columns = QString::fromLatin1("gid").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("ridIndex");
        idx.columns = QString::fromLatin1("remoteId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("FlagTable");

    t.columns.reserve(2);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      
      c.isUnique = true;
      

      t.columns.push_back(c);
    }
    

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("PartTypeTable");

    t.columns.reserve(3);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("ns");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(1);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("partTypeNameIndex");
        idx.columns = QString::fromLatin1("ns,name").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = true;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("PartTable");

    t.columns.reserve(7);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("pimItemId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("PimItem");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("partTypeId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("PartType");
      
      c.refColumn = QLatin1String("id");
      
      c.noUpdate = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("data");
      c.type = QLatin1String("QByteArray");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("datasize");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("version");
      c.type = QLatin1String("int");
      
      c.defaultValue = QLatin1String("0");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("external");
      c.type = QLatin1String("bool");
      
      c.defaultValue = QLatin1String("false");
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(1);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("pimItemIdTypeIndex");
        idx.columns = QString::fromLatin1("pimItemId,partTypeId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = true;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("CollectionAttributeTable");

    t.columns.reserve(4);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("collectionId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("Collection");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("type");
      c.type = QLatin1String("QByteArray");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("value");
      c.type = QLatin1String("QByteArray");
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(1);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("collectionIndex");
        idx.columns = QString::fromLatin1("collectionId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("TagTypeTable");

    t.columns.reserve(2);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("name");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      
      c.isUnique = true;
      

      t.columns.push_back(c);
    }
    
      t.data.reserve(1);
      
      {
        const QStringList columns = QString::fromLatin1("id,name").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        const QStringList values = QString::fromLatin1("1,'PLAIN'").split( QLatin1Char( ',' ), QString::SkipEmptyParts );

        Q_ASSERT( columns.count() == values.count() );

        DataDescription d;
        d.data.reserve(columns.size());
        for ( int i = 0; i < columns.size(); ++i )
          d.data.insert( columns.at( i ), values.at( i ) );

        t.data.push_back(d);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("TagTable");

    t.columns.reserve(4);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("gid");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("parentId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = true;
      
      c.refTable = QLatin1String("Tag");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("typeId");
      c.type = QLatin1String("qint64");
      
      c.refTable = QLatin1String("TagType");
      
      c.refColumn = QLatin1String("id");
      
      c.defaultValue = QLatin1String("1");
      
      c.onDelete = ColumnDescription::Restrict;
      

      t.columns.push_back(c);
    }
    

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("TagAttributeTable");

    t.columns.reserve(4);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("id");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.isAutoIncrement = true;
      
      c.isPrimaryKey = true;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("tagId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("Tag");
      
      c.refColumn = QLatin1String("id");
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("type");
      c.type = QLatin1String("QByteArray");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("value");
      c.type = QLatin1String("QByteArray");
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(1);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("tagIndex");
        idx.columns = QString::fromLatin1("tagId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = false;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  {
    TableDescription t;
    t.name = QLatin1String("TagRemoteIdResourceRelationTable");

    t.columns.reserve(3);
    
    {
      ColumnDescription c;
      c.name = QLatin1String("tagId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("Tag");
      
      c.refColumn = QLatin1String("id");
      
      c.onDelete = ColumnDescription::Cascade;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("resourceId");
      c.type = QLatin1String("qint64");
      
      c.allowNull = false;
      
      c.refTable = QLatin1String("Resource");
      
      c.refColumn = QLatin1String("id");
      
      c.onDelete = ColumnDescription::Cascade;
      

      t.columns.push_back(c);
    }
    
    {
      ColumnDescription c;
      c.name = QLatin1String("remoteId");
      c.type = QLatin1String("QString");
      
      c.allowNull = false;
      

      t.columns.push_back(c);
    }
    
      t.indexes.reserve(1);
      
      {
        IndexDescription idx;
        idx.name = QLatin1String("TagAndResourceIndex");
        idx.columns = QString::fromLatin1("tagId,resourceId").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
        
        idx.isUnique = true;
        

        t.indexes.push_back(idx);
      }
      

    tabs.push_back(t);
  }
  
  return tabs;
}

QVector<RelationDescription> AkonadiSchema::relations()
{
  QVector<RelationDescription> rels;
  rels.reserve(4);
  
  {
    RelationDescription r;
    r.firstTable = QLatin1String("PimItem");
    r.firstColumn = QLatin1String("id");
    r.secondTable = QLatin1String("Flag");
    r.secondColumn = QLatin1String("id");
    rels.push_back(r);
  }
  
  {
    RelationDescription r;
    r.firstTable = QLatin1String("PimItem");
    r.firstColumn = QLatin1String("id");
    r.secondTable = QLatin1String("Tag");
    r.secondColumn = QLatin1String("id");
    rels.push_back(r);
  }
  
  {
    RelationDescription r;
    r.firstTable = QLatin1String("Collection");
    r.firstColumn = QLatin1String("id");
    r.secondTable = QLatin1String("MimeType");
    r.secondColumn = QLatin1String("id");
    rels.push_back(r);
  }
  
  {
    RelationDescription r;
    r.firstTable = QLatin1String("Collection");
    r.firstColumn = QLatin1String("id");
    r.secondTable = QLatin1String("PimItem");
    r.secondColumn = QLatin1String("id");
    rels.push_back(r);
  }
  
  return rels;
}

