client/sql/postgres/entity_usage.sql
-- This file is automatically generated using maintenance/generateSchemaSql.php.
-- Source: extensions/Wikibase/client/sql/abstract/entity_usage.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE wbc_entity_usage (
eu_row_id BIGSERIAL NOT NULL,
eu_entity_id TEXT NOT NULL,
eu_aspect TEXT NOT NULL,
eu_page_id INT NOT NULL,
PRIMARY KEY(eu_row_id)
);
CREATE UNIQUE INDEX eu_entity_id ON wbc_entity_usage (
eu_entity_id, eu_aspect, eu_page_id
);
CREATE INDEX eu_page_id ON wbc_entity_usage (eu_page_id, eu_entity_id);