Warning, /pim/akonadi/autotests/server/dbtest_data/dbinit_psql_incremental is written in an unsupported language. File is not indexed.

0001 ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0
0002 
0003 ALTER TABLE SchemaVersionTable ADD COLUMN generation INTEGER NOT NULL DEFAULT 0
0004 
0005 ALTER TABLE ResourceTable ADD COLUMN id SERIAL PRIMARY KEY
0006 
0007 ALTER TABLE ResourceTable ADD COLUMN name TEXT UNIQUE NOT NULL
0008 
0009 ALTER TABLE ResourceTable ADD COLUMN isVirtual BOOL DEFAULT false
0010 
0011 ALTER TABLE CollectionTable ADD COLUMN id SERIAL PRIMARY KEY
0012 
0013 ALTER TABLE CollectionTable ADD COLUMN remoteId TEXT
0014 
0015 ALTER TABLE CollectionTable ADD COLUMN remoteRevision TEXT
0016 
0017 ALTER TABLE CollectionTable ADD COLUMN name TEXT NOT NULL
0018 
0019 ALTER TABLE CollectionTable ADD COLUMN parentId int8
0020 
0021 ALTER TABLE CollectionTable ADD COLUMN resourceId int8 NOT NULL
0022 
0023 ALTER TABLE CollectionTable ADD COLUMN enabled BOOL NOT NULL DEFAULT true
0024 
0025 ALTER TABLE CollectionTable ADD COLUMN syncPref SMALLINT DEFAULT 2
0026 
0027 ALTER TABLE CollectionTable ADD COLUMN displayPref SMALLINT DEFAULT 2
0028 
0029 ALTER TABLE CollectionTable ADD COLUMN indexPref SMALLINT DEFAULT 2
0030 
0031 ALTER TABLE CollectionTable ADD COLUMN referenced BOOL NOT NULL DEFAULT false
0032 
0033 ALTER TABLE CollectionTable ADD COLUMN cachePolicyInherit BOOL NOT NULL DEFAULT true
0034 
0035 ALTER TABLE CollectionTable ADD COLUMN cachePolicyCheckInterval INTEGER NOT NULL DEFAULT -1
0036 
0037 ALTER TABLE CollectionTable ADD COLUMN cachePolicyCacheTimeout INTEGER NOT NULL DEFAULT -1
0038 
0039 ALTER TABLE CollectionTable ADD COLUMN cachePolicySyncOnDemand BOOL NOT NULL DEFAULT false
0040 
0041 ALTER TABLE CollectionTable ADD COLUMN cachePolicyLocalParts TEXT
0042 
0043 ALTER TABLE CollectionTable ADD COLUMN queryString TEXT
0044 
0045 ALTER TABLE CollectionTable ADD COLUMN queryAttributes TEXT
0046 
0047 ALTER TABLE CollectionTable ADD COLUMN queryCollections TEXT
0048 
0049 ALTER TABLE CollectionTable ADD COLUMN isVirtual BOOL DEFAULT false
0050 
0051 ALTER TABLE MimeTypeTable ADD COLUMN id SERIAL PRIMARY KEY
0052 
0053 ALTER TABLE MimeTypeTable ADD COLUMN name TEXT UNIQUE NOT NULL
0054 
0055 ALTER TABLE PimItemTable ADD COLUMN id SERIAL PRIMARY KEY
0056 
0057 ALTER TABLE PimItemTable ADD COLUMN rev INTEGER NOT NULL DEFAULT 0
0058 
0059 ALTER TABLE PimItemTable ADD COLUMN remoteId TEXT
0060 
0061 ALTER TABLE PimItemTable ADD COLUMN remoteRevision TEXT
0062 
0063 ALTER TABLE PimItemTable ADD COLUMN gid TEXT
0064 
0065 ALTER TABLE PimItemTable ADD COLUMN collectionId int8
0066 
0067 ALTER TABLE PimItemTable ADD COLUMN mimeTypeId int8
0068 
0069 ALTER TABLE PimItemTable ADD COLUMN datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
0070 
0071 ALTER TABLE PimItemTable ADD COLUMN atime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
0072 
0073 ALTER TABLE PimItemTable ADD COLUMN dirty BOOL
0074 
0075 ALTER TABLE PimItemTable ADD COLUMN size int8 NOT NULL DEFAULT 0
0076 
0077 ALTER TABLE FlagTable ADD COLUMN id SERIAL PRIMARY KEY
0078 
0079 ALTER TABLE FlagTable ADD COLUMN name TEXT UNIQUE NOT NULL
0080 
0081 ALTER TABLE PartTypeTable ADD COLUMN id SERIAL PRIMARY KEY
0082 
0083 ALTER TABLE PartTypeTable ADD COLUMN name TEXT NOT NULL
0084 
0085 ALTER TABLE PartTypeTable ADD COLUMN ns TEXT NOT NULL
0086 
0087 ALTER TABLE PartTable ADD COLUMN id SERIAL PRIMARY KEY
0088 
0089 ALTER TABLE PartTable ADD COLUMN pimItemId int8 NOT NULL
0090 
0091 ALTER TABLE PartTable ADD COLUMN data BYTEA
0092 
0093 ALTER TABLE PartTable ADD COLUMN datasize int8 NOT NULL
0094 
0095 ALTER TABLE PartTable ADD COLUMN version INTEGER DEFAULT 0
0096 
0097 ALTER TABLE PartTable ADD COLUMN storage SMALLINT DEFAULT 0
0098 
0099 ALTER TABLE CollectionAttributeTable ADD COLUMN id SERIAL PRIMARY KEY
0100 
0101 ALTER TABLE CollectionAttributeTable ADD COLUMN collectionId int8 NOT NULL
0102 
0103 ALTER TABLE CollectionAttributeTable ADD COLUMN type BYTEA NOT NULL
0104 
0105 ALTER TABLE CollectionAttributeTable ADD COLUMN value BYTEA
0106 
0107 ALTER TABLE TagTypeTable ADD COLUMN id SERIAL PRIMARY KEY
0108 
0109 ALTER TABLE TagTypeTable ADD COLUMN name TEXT UNIQUE NOT NULL
0110 
0111 ALTER TABLE TagTable ADD COLUMN id SERIAL PRIMARY KEY
0112 
0113 ALTER TABLE TagTable ADD COLUMN gid TEXT NOT NULL
0114 
0115 ALTER TABLE TagTable ADD COLUMN parentId int8
0116 
0117 ALTER TABLE TagTable ADD COLUMN typeId int8 DEFAULT 1
0118 
0119 ALTER TABLE TagAttributeTable ADD COLUMN id SERIAL PRIMARY KEY
0120 
0121 ALTER TABLE TagAttributeTable ADD COLUMN tagId int8 NOT NULL
0122 
0123 ALTER TABLE TagAttributeTable ADD COLUMN type BYTEA NOT NULL
0124 
0125 ALTER TABLE TagAttributeTable ADD COLUMN value BYTEA
0126 
0127 ALTER TABLE TagRemoteIdResourceRelationTable ADD COLUMN tagId int8 NOT NULL
0128 
0129 ALTER TABLE TagRemoteIdResourceRelationTable ADD COLUMN resourceId int8 NOT NULL
0130 
0131 ALTER TABLE TagRemoteIdResourceRelationTable ADD COLUMN remoteId TEXT NOT NULL
0132 
0133 ALTER TABLE RelationTypeTable ADD COLUMN id SERIAL PRIMARY KEY
0134 
0135 ALTER TABLE RelationTypeTable ADD COLUMN name TEXT UNIQUE NOT NULL
0136 
0137 ALTER TABLE RelationTable ADD COLUMN leftId int8 NOT NULL
0138 
0139 ALTER TABLE RelationTable ADD COLUMN rightId int8 NOT NULL
0140 
0141 ALTER TABLE RelationTable ADD COLUMN typeId int8 DEFAULT 1
0142 
0143 ALTER TABLE RelationTable ADD COLUMN remoteId TEXT
0144 
0145 ALTER TABLE PimItemFlagRelation ADD COLUMN PimItem_id int8 NOT NULL
0146 
0147 ALTER TABLE PimItemFlagRelation ADD COLUMN Flag_id int8 NOT NULL
0148 
0149 ALTER TABLE PimItemTagRelation ADD COLUMN PimItem_id int8 NOT NULL
0150 
0151 ALTER TABLE PimItemTagRelation ADD COLUMN Tag_id int8 NOT NULL
0152 
0153 ALTER TABLE CollectionMimeTypeRelation ADD COLUMN Collection_id int8 NOT NULL
0154 
0155 ALTER TABLE CollectionMimeTypeRelation ADD COLUMN MimeType_id int8 NOT NULL
0156 
0157 ALTER TABLE CollectionPimItemRelation ADD COLUMN Collection_id int8 NOT NULL
0158 
0159 ALTER TABLE CollectionPimItemRelation ADD COLUMN PimItem_id int8 NOT NULL
0160 
0161 ALTER TABLE PimItemTable DROP CONSTRAINT myForeignKeyIdentifier
0162 
0163 ALTER TABLE CollectionAttributeTable DROP CONSTRAINT myForeignKeyIdentifier
0164 
0165 ALTER TABLE CollectionTable ADD CONSTRAINT CollectionTableparentId_Collectionid_fk FOREIGN KEY (parentId) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0166 
0167 ALTER TABLE CollectionTable ADD CONSTRAINT CollectionTableresourceId_Resourceid_fk FOREIGN KEY (resourceId) REFERENCES ResourceTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0168 
0169 ALTER TABLE PimItemTable ADD CONSTRAINT PimItemTablecollectionId_Collectionid_fk FOREIGN KEY (collectionId) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0170 
0171 ALTER TABLE PimItemTable ADD CONSTRAINT PimItemTablemimeTypeId_MimeTypeid_fk FOREIGN KEY (mimeTypeId) REFERENCES MimeTypeTable(id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED
0172 
0173 ALTER TABLE PartTable ADD CONSTRAINT PartTablepimItemId_PimItemid_fk FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0174 
0175 ALTER TABLE PartTable ADD CONSTRAINT PartTablepartTypeId_PartTypeid_fk FOREIGN KEY (partTypeId) REFERENCES PartTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0176 
0177 ALTER TABLE CollectionAttributeTable ADD CONSTRAINT CollectionAttributeTablecollectionId_Collectionid_fk FOREIGN KEY (collectionId) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0178 
0179 ALTER TABLE TagTable ADD CONSTRAINT TagTableparentId_Tagid_fk FOREIGN KEY (parentId) REFERENCES TagTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0180 
0181 ALTER TABLE TagTable ADD CONSTRAINT TagTabletypeId_TagTypeid_fk FOREIGN KEY (typeId) REFERENCES TagTypeTable(id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED
0182 
0183 ALTER TABLE TagAttributeTable ADD CONSTRAINT TagAttributeTabletagId_Tagid_fk FOREIGN KEY (tagId) REFERENCES TagTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0184 
0185 ALTER TABLE TagRemoteIdResourceRelationTable ADD CONSTRAINT TagRemoteIdResourceRelationTabletagId_Tagid_fk FOREIGN KEY (tagId) REFERENCES TagTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0186 
0187 ALTER TABLE TagRemoteIdResourceRelationTable ADD CONSTRAINT TagRemoteIdResourceRelationTableresourceId_Resourceid_fk FOREIGN KEY (resourceId) REFERENCES ResourceTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0188 
0189 ALTER TABLE RelationTable ADD CONSTRAINT RelationTableleftId_PimItemid_fk FOREIGN KEY (leftId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0190 
0191 ALTER TABLE RelationTable ADD CONSTRAINT RelationTablerightId_PimItemid_fk FOREIGN KEY (rightId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0192 
0193 ALTER TABLE RelationTable ADD CONSTRAINT RelationTabletypeId_RelationTypeid_fk FOREIGN KEY (typeId) REFERENCES RelationTypeTable(id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED
0194 
0195 ALTER TABLE PimItemFlagRelation ADD CONSTRAINT PimItemFlagRelationPimItem_id_PimItemid_fk FOREIGN KEY (PimItem_id) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0196 
0197 ALTER TABLE PimItemFlagRelation ADD CONSTRAINT PimItemFlagRelationFlag_id_Flagid_fk FOREIGN KEY (Flag_id) REFERENCES FlagTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0198 
0199 ALTER TABLE PimItemTagRelation ADD CONSTRAINT PimItemTagRelationPimItem_id_PimItemid_fk FOREIGN KEY (PimItem_id) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0200 
0201 ALTER TABLE PimItemTagRelation ADD CONSTRAINT PimItemTagRelationTag_id_Tagid_fk FOREIGN KEY (Tag_id) REFERENCES TagTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0202 
0203 ALTER TABLE CollectionMimeTypeRelation ADD CONSTRAINT CollectionMimeTypeRelationCollection_id_Collectionid_fk FOREIGN KEY (Collection_id) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0204 
0205 ALTER TABLE CollectionMimeTypeRelation ADD CONSTRAINT CollectionMimeTypeRelationMimeType_id_MimeTypeid_fk FOREIGN KEY (MimeType_id) REFERENCES MimeTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0206 
0207 ALTER TABLE CollectionPimItemRelation ADD CONSTRAINT CollectionPimItemRelationCollection_id_Collectionid_fk FOREIGN KEY (Collection_id) REFERENCES CollectionTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0208 
0209 ALTER TABLE CollectionPimItemRelation ADD CONSTRAINT CollectionPimItemRelationPimItem_id_PimItemid_fk FOREIGN KEY (PimItem_id) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
0210