Permalink
Browse files

Oracle - change Commits PK to CheckpointNumber and add unique index f…

…or (BucketId, StreamId, CommitSequence)
  • Loading branch information...
damianh committed Oct 2, 2013
1 parent 8745002 commit b66e0c157540d71d1b0988d3ea64917f8626a1dd

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -229,7 +229,8 @@ IF table_count = 0 THEN DBMS_OUTPUT.PUT_LINE ('Creating the Commits table');
Dispatched NUMBER(1) DEFAULT(0) NOT NULL,
Headers BLOB CHECK (Headers IS NULL OR LENGTH(Headers) > 0) NULL,
Payload BLOB CHECK (LENGTH(Payload) > 0) NOT NULL,
- CONSTRAINT PK_Commits PRIMARY KEY (BucketId, StreamId, CommitSequence))');
+ CONSTRAINT PK_Commits PRIMARY KEY (CheckpointNumber))');
+ EXECUTE IMMEDIATE ('CREATE UNIQUE INDEX IX_Commits_CommitSequence ON Commits (BucketId, StreamId, CommitSequence)');
EXECUTE IMMEDIATE ('CREATE UNIQUE INDEX IX_Commits ON Commits (BucketId, StreamId, CommitId)');
EXECUTE IMMEDIATE ('CREATE UNIQUE INDEX IX_Commits_Revisions ON Commits (BucketId, StreamId, StreamRevision, Items)');
EXECUTE IMMEDIATE ('CREATE INDEX IX_Commits_Dispatched ON Commits (Dispatched)');

0 comments on commit b66e0c1

Please sign in to comment.