2012-04-30 16:53:53 +02:00
|
|
|
create table {$NAMESPACE}_repository.repository_commitdata (
|
2011-03-11 18:34:22 +01:00
|
|
|
id int unsigned not null auto_increment primary key,
|
|
|
|
commitID int unsigned not null,
|
|
|
|
authorName varchar(255) not null,
|
|
|
|
commitMessage longblob not null,
|
|
|
|
unique key (commitID),
|
2015-01-23 01:10:26 +01:00
|
|
|
key (authorName(128))
|
2011-03-11 18:34:22 +01:00
|
|
|
);
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_task drop priority;
|
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_task drop key leaseOwner;
|
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_task add key (leaseOwner(16));
|
2011-03-11 18:34:22 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
create table {$NAMESPACE}_repository.repository_path (
|
2011-03-11 18:34:22 +01:00
|
|
|
id int unsigned not null auto_increment primary key,
|
2012-04-30 16:53:53 +02:00
|
|
|
path varchar(128) binary not null,
|
2011-03-11 18:34:22 +01:00
|
|
|
unique key (path)
|
|
|
|
);
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
create table {$NAMESPACE}_repository.repository_pathchange (
|
2011-03-11 18:34:22 +01:00
|
|
|
repositoryID int unsigned NOT NULL,
|
|
|
|
pathID int unsigned NOT NULL,
|
|
|
|
commitID int unsigned NOT NULL,
|
|
|
|
targetPathID int unsigned,
|
|
|
|
targetCommitID int unsigned,
|
|
|
|
changeType int unsigned NOT NULL,
|
|
|
|
fileType int unsigned NOT NULL,
|
|
|
|
isDirect bool NOT NULL,
|
|
|
|
commitSequence int unsigned NOT NULL,
|
|
|
|
primary key (commitID, pathID),
|
|
|
|
key (repositoryID, pathID, commitSequence)
|
|
|
|
);
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
create table {$NAMESPACE}_repository.repository_filesystem (
|
2011-03-11 18:34:22 +01:00
|
|
|
repositoryID int unsigned not null,
|
|
|
|
parentID int unsigned not null,
|
|
|
|
svnCommit int unsigned not null,
|
|
|
|
pathID int unsigned not null,
|
|
|
|
existed bool not null,
|
|
|
|
fileType int unsigned not null,
|
|
|
|
primary key (repositoryID, parentID, svnCommit, pathID)
|
|
|
|
);
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
alter table {$NAMESPACE}_repository.repository_filesystem add key (repositoryID, svnCommit);
|
2011-03-13 07:51:40 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
truncate {$NAMESPACE}_repository.repository_commit;
|
|
|
|
alter table {$NAMESPACE}_repository.repository_commit
|
2011-03-13 07:51:40 +01:00
|
|
|
change repositoryPHID repositoryID int unsigned not null;
|
2012-04-30 16:53:53 +02:00
|
|
|
alter table {$NAMESPACE}_repository.repository_commit drop key repositoryPHID;
|
|
|
|
alter table {$NAMESPACE}_repository.repository_commit add unique key
|
2011-03-13 07:51:40 +01:00
|
|
|
(repositoryID, commitIdentifier(16));
|
2012-04-30 16:53:53 +02:00
|
|
|
alter table {$NAMESPACE}_repository.repository_commit add key
|
2011-03-13 07:51:40 +01:00
|
|
|
(repositoryID, epoch);
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
alter table {$NAMESPACE}_repository.repository_filesystem
|
2011-03-15 21:51:53 +01:00
|
|
|
add key (repositoryID, pathID, svnCommit);
|