DROP SEQUENCE cmUserPropDigAsset_seq;

CREATE SEQUENCE cmUserPropDigAsset_seq START WITH 100000 INCREMENT BY 1;

DROP TABLE cmUserPropDigAsset;

CREATE TABLE cmUserPropDigAsset (
  userPropId number default 0 NOT NULL,
  DigAssetId number 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 number default 0 NOT NULL,
  DigAssetId number default 0 NOT NULL,
  PRIMARY KEY  (rolePropId, DigAssetId)
);

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

CREATE INDEX "contentTypeDefinitionIdINDEX" ON cmCont(contentTypeDefId);
