-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
879c09b
to
fe0d519
Compare
We need to be able to create the schema before we can add functionality that uses the schema. Followed the same patterns as the schema updating code in Wikibase Repo, eg DatabaseSchemaUpdater
fe0d519
to
9a47ef4
Compare
wbx_text VARBINARY(255) NOT NULL | ||
) /*$wgDBTableOptions*/; | ||
|
||
CREATE UNIQUE INDEX /*i*/wbt_text_text ON /*_*/wbt_text (wbx_text); |
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 file is an unchanged copy of what is in Wikibase.git master, except for the above index, which was renamed from wbt_text
. The test caught that the index had the same name as the table.
-- index that includes items as well, but rather a very small one. | ||
-- - conceptually, items and properties are two different entity types, and | ||
-- since different entity types might have different constraints and maybe | ||
-- even structure, splitting them into corrisponding tables saves us from |
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.
Typo in "corrisponding".
-- | ||
-- Note on Entity IDs: | ||
-- ------------------ | ||
-- Since wikidata entity ids are fixed and known to always be Q (like in Q123), |
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 sentence uses the term "entity" in a confusing way. For what this codebase currently cares about, only Item IDs and Property IDs are known to be prefixed integers. Saying that (all) "wikidata entity ids are fixed" can be very confusing. It would be good to avoid the terminology "Entity ID" here.
) /*$wgDBTableOptions*/; | ||
|
||
CREATE INDEX /*i*/wbt_text_in_lang_language ON /*_*/wbt_text_in_lang (wbxl_language); | ||
CREATE UNIQUE INDEX /*i*/wbt_text_in_lang_text_id_text_id ON /*_*/wbt_text_in_lang (wbxl_text_id, wbxl_language); |
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.
Why is "text_id_text_id" repeated?
We need to be able to create the schema before
we can add functionality that uses the schema.
Followed the same patterns as the schema updating code
in Wikibase Repo, eg DatabaseSchemaUpdater