Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions internal/database/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,29 @@ Indexes:

```

# Table "public.insights_query_runner_jobs"
```
Column | Type | Modifiers
-----------------+--------------------------+-------------------------------------------------------------------------
id | integer | not null default nextval('insights_query_runner_jobs_id_seq'::regclass)
series_id | text | not null
search_query | text | not null
state | text | default 'queued'::text
failure_message | text |
started_at | timestamp with time zone |
finished_at | timestamp with time zone |
process_after | timestamp with time zone |
num_resets | integer | not null default 0
num_failures | integer | not null default 0
execution_logs | json[] |
Indexes:
"insights_query_runner_jobs_pkey" PRIMARY KEY, btree (id)
"insights_query_runner_jobs_state_btree" btree (state)

```

See [enterprise/internal/insights/background/queryrunner/worker.go:Job](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:enterprise/internal/insights/background/queryrunner/worker.go+type+Job&patternType=literal)

# Table "public.lsif_dirty_repositories"
```
Column | Type | Modifiers
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN;

DROP INDEX IF EXISTS insights_query_runner_jobs_state_btree;
DROP TABLE IF EXISTS insights_query_runner_jobs;

COMMIT;
20 changes: 20 additions & 0 deletions migrations/frontend/1528395783_insights_query_runner_jobs.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
BEGIN;

CREATE TABLE IF NOT EXISTS insights_query_runner_jobs(
id SERIAL PRIMARY KEY,
series_id text NOT NULL,
search_query text NOT NULL,
state text default 'queued',
failure_message text,
started_at timestamptz,
finished_at timestamptz,
process_after timestamptz,
num_resets int4 NOT NULL default 0,
num_failures int4 NOT NULL default 0,
execution_logs json[]
);
CREATE INDEX insights_query_runner_jobs_state_btree ON insights_query_runner_jobs USING btree (state);

COMMENT ON TABLE insights_query_runner_jobs IS 'See [enterprise/internal/insights/background/queryrunner/worker.go:Job](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:enterprise/internal/insights/background/queryrunner/worker.go+type+Job&patternType=literal)';

COMMIT;
46 changes: 46 additions & 0 deletions migrations/frontend/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.