Skip to content
This repository has been archived by the owner on Jul 20, 2019. It is now read-only.

Add TermStoreSchemaUpdater class #1

Merged
merged 1 commit into from
May 6, 2019
Merged

Add TermStoreSchemaUpdater class #1

merged 1 commit into from
May 6, 2019

Conversation

JeroenDeDauw
Copy link
Contributor

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

@JeroenDeDauw JeroenDeDauw force-pushed the SchemaUpdater branch 4 times, most recently from 879c09b to fe0d519 Compare May 5, 2019 11:06
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
wbx_text VARBINARY(255) NOT NULL
) /*$wgDBTableOptions*/;

CREATE UNIQUE INDEX /*i*/wbt_text_text ON /*_*/wbt_text (wbx_text);
Copy link
Contributor Author

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.

@AlaaSarhan AlaaSarhan merged commit 2320023 into master May 6, 2019
@AlaaSarhan AlaaSarhan deleted the SchemaUpdater branch May 6, 2019 09:13
-- 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

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),

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);

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants