Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to the database but not finding the tables should throw an error #54

Closed
alcortesm opened this issue Jun 15, 2017 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@alcortesm
Copy link
Contributor

alcortesm commented Jun 15, 2017

As a runner of borges,
I want to know if the database is missing the necessary tables,
so that I can add them myself and try again running borges.

Right now borges just sits there silently doing nothing when it does not find the required tables in the database.

Alternatively Borges can add the tables itself instead of complaining that they are not there.

@alcortesm
Copy link
Contributor Author

alcortesm commented Jun 15, 2017

Otherwise, when connecting to a database that has just been created from scratch, tables has to be manually added before running borges, or it will silently hang there waiting for nothing.

CREATE TABLE IF NOT EXISTS repositories (
    id uuid PRIMARY KEY,
    created_at timestamptz,
    updated_at timestamptz,
    endpoints text[],
    status varchar(20),
    fetched_at timestamptz,
    fetch_error_at timestamptz,
    last_commit_at timestamptz,
    _references jsonb
    );

@alcortesm
Copy link
Contributor Author

False alarm, apparently borges is already complaining about the lack of tables in the database:

EROR[06-22|22:03:32] error obtaining next job                 module=producer err="pq: relation \"repositories\" does not exist" caller=producer.go:76

@ajnavarro ajnavarro modified the milestone: 0.1 Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants