forked from piernov/zotprime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add id servers for generating global object ids (to allow for movin…
…g objects between shards) - Fix FK bug that was causing sync processes to stay locked after certain errors
- Loading branch information
Showing
8 changed files
with
155 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
-- From http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ | ||
|
||
CREATE TABLE `collections` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; | ||
|
||
CREATE TABLE `creators` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; | ||
|
||
CREATE TABLE `items` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; | ||
|
||
CREATE TABLE `relations` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; | ||
|
||
CREATE TABLE `savedSearches` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; | ||
|
||
CREATE TABLE `tags` ( | ||
`id` int(10) unsigned NOT NULL auto_increment, | ||
`stub` char(1) NOT NULL default '', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `stub` (`stub`) | ||
) ENGINE=MyISAM; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters