internal/store/migrations/0011_topics.up.sql

e7586fc527c6cf5008c857e0d2e6d8f7d43a9d5e
gitbay/internal/store/migrations/0011_topics.up.sql history · blame · raw

6 lines · 215 bytes

1CREATE TABLE repo_topics (
2    repo_id  INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
3    topic    TEXT NOT NULL,
4    PRIMARY KEY (repo_id, topic)
5);
6CREATE INDEX repo_topics_topic ON repo_topics(topic);