-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
creator as non-classic data object #161
base: master
Are you sure you want to change the base?
Changes from 3 commits
9a15ff7
0561025
e03e1dc
170704d
dd18ed3
422ac13
baf5c93
8a25c08
ed68a2e
ea9030c
327f68e
2956830
938f1fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
alter table itemCreators drop constraint itemCreators_ibfk_2; | ||
DROP table creators; | ||
|
||
DROP trigger if exists fki_itemCreators_libraryID; | ||
DROP trigger if exists fku_itemCreators_libraryID; | ||
|
||
CREATE TABLE `creators` ( | ||
`creatorID` bigint unsigned NOT NULL AUTO_INCREMENT, | ||
`firstName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, | ||
`lastName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, | ||
`fieldMode` tinyint(1) unsigned DEFAULT NULL, | ||
PRIMARY KEY (`creatorID`), | ||
KEY `name` (`lastName`(7),`firstName`(6)) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,7 @@ CREATE TABLE `libraries` ( | |
`lastUpdated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', | ||
`version` int(10) unsigned NOT NULL DEFAULT '0', | ||
`shardID` smallint(5) unsigned NOT NULL, | ||
`hasData` TINYINT( 1 ) NOT NULL DEFAULT '0', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to add this, but it shouldn't be in this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I push just this one line to master? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
PRIMARY KEY (`libraryID`), | ||
KEY `shardID` (`shardID`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need all the schema changes here |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,7 +330,7 @@ CREATE TABLE `syncDeleteLogIDs` ( | |
|
||
CREATE TABLE `syncDeleteLogKeys` ( | ||
`libraryID` int(10) unsigned NOT NULL, | ||
`objectType` enum('collection','creator','item','relation','search','setting','tag','tagName') NOT NULL, | ||
`objectType` enum('collection','item','relation','search','setting','tag','tagName') NOT NULL, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
`key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, | ||
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`version` int(10) unsigned NOT NULL DEFAULT '1', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be a PHP script like the others that does a proper migration of existing data. It should set the shard to
down
, wait 20 seconds, do the migration, and bring the shard up.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I only kept it as .sql until now for convenience.
I'll have it wrapped into the same algorithm as this update, except with state=
down
.