DROP SEQUENCE cmUserPropDigAsset_seq;

CREATE SEQUENCE cmUserPropDigAsset_seq START WITH 100000 INCREMENT BY 1;

DROP TABLE cmUserPropDigAsset;

CREATE TABLE cmUserPropDigAsset (
  userPropId integer default 0 NOT NULL,
  digAssetId integer default 0 NOT NULL,
  PRIMARY KEY  (userPropId, digAssetId)
);

DROP SEQUENCE cmRolePropDigAsset_seq;

CREATE SEQUENCE cmRolePropDigAsset_seq START WITH 100000 INCREMENT BY 1;

DROP TABLE cmRolePropDigAsset;

CREATE TABLE cmRolePropDigAsset (
  rolePropId integer default 0 NOT NULL,
  digAssetId integer default 0 NOT NULL,
  PRIMARY KEY  (rolePropId, digAssetId)
);

ALTER TABLE cmRepositoryLanguage ADD COLUMN sortOrder integer default 0 NOT NULL;

CREATE INDEX "contTypeDefIdIND" ON cmCont(contentTypeDefId);