2012-04-30 07:53:53 -07:00
|
|
|
create table {$NAMESPACE}_repository.repository_commitdata (
|
2011-03-11 09:34:22 -08: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),
|
|
|
|
key (authorName)
|
|
|
|
);
|
|
|
|
|
2012-04-30 07:53:53 -07: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 09:34:22 -08:00
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
create table {$NAMESPACE}_repository.repository_path (
|
2011-03-11 09:34:22 -08:00
|
|
|
id int unsigned not null auto_increment primary key,
|
2012-04-30 07:53:53 -07:00
|
|
|
path varchar(128) binary not null,
|
2011-03-11 09:34:22 -08:00
|
|
|
unique key (path)
|
|
|
|
);
|
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
create table {$NAMESPACE}_repository.repository_pathchange (
|
2011-03-11 09:34:22 -08: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 07:53:53 -07:00
|
|
|
create table {$NAMESPACE}_repository.repository_filesystem (
|
2011-03-11 09:34:22 -08: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-12 16:17:34 -08:00
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
alter table {$NAMESPACE}_repository.repository_filesystem add key (repositoryID, svnCommit);
|
2011-03-12 22:51:40 -08:00
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
truncate {$NAMESPACE}_repository.repository_commit;
|
|
|
|
alter table {$NAMESPACE}_repository.repository_commit
|
2011-03-12 22:51:40 -08:00
|
|
|
change repositoryPHID repositoryID int unsigned not null;
|
2012-04-30 07:53:53 -07:00
|
|
|
alter table {$NAMESPACE}_repository.repository_commit drop key repositoryPHID;
|
|
|
|
alter table {$NAMESPACE}_repository.repository_commit add unique key
|
2011-03-12 22:51:40 -08:00
|
|
|
(repositoryID, commitIdentifier(16));
|
2012-04-30 07:53:53 -07:00
|
|
|
alter table {$NAMESPACE}_repository.repository_commit add key
|
2011-03-12 22:51:40 -08:00
|
|
|
(repositoryID, epoch);
|
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
alter table {$NAMESPACE}_repository.repository_filesystem
|
2011-03-15 20:51:53 +00:00
|
|
|
add key (repositoryID, pathID, svnCommit);
|