diff --git a/sql/pimp_db.sql b/sql/pimp_db.sql index 48bc670..eee56ce 100644 --- a/sql/pimp_db.sql +++ b/sql/pimp_db.sql @@ -1,18 +1,25 @@ CREATE VIEW orig_repos AS SELECT id, name, full_name, html_url, description, last_seen FROM repos WHERE NOT fork; CREATE VIEW fork_repos AS SELECT id, name, full_name, html_url, description, last_seen FROM repos WHERE fork CREATE EXTENSION pg_trgm; CREATE INDEX ix_trgm_repos_description ON repos USING gin (description gin_trgm_ops); CREATE INDEX ix_trgm_repos_full_name ON repos USING gin (full_name gin_trgm_ops); + +CREATE TABLE repos_history ( + ts timestamp DEFAULT current_timestamp, + repos integer NOT NULL, + fork_repos integer, + orig_repos integer +);