parent
704dd5bab6
commit
68ca447076
@ -0,0 +1,10 @@
|
||||
CREATE TABLE news_resources_topics (
|
||||
news_resource_id TEXT NOT NULL,
|
||||
topic_id TEXT NOT NULL,
|
||||
PRIMARY KEY (news_resource_id, topic_id),
|
||||
FOREIGN KEY (news_resource_id) REFERENCES news_resources(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (topic_id) REFERENCES TopicEntity(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX idx_news_resource_id ON news_resources_topics(news_resource_id);
|
||||
CREATE INDEX idx_topic_id ON news_resources_topics(topic_id);
|
||||
Loading…
Reference in new issue