diff --git a/ee/tabby-db/schema/schema.sql b/ee/tabby-db/schema/schema.sql index e855a24eb36d..7877f0cfe181 100644 --- a/ee/tabby-db/schema/schema.sql +++ b/ee/tabby-db/schema/schema.sql @@ -98,6 +98,12 @@ CREATE INDEX user_completions_completion_id_idx ON user_completions( ); CREATE INDEX idx_job_created_at ON job_runs(job, created_at); CREATE INDEX idx_repository_name ON repositories(name); +CREATE TABLE github_repository_provider( + id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + display_name TEXT NOT NULL, + access_token TEXT, + synced_at TIMESTAMP +); CREATE INDEX idx_user_completion_user_id_created_at_language ON user_completions( user_id, created_at, @@ -144,15 +150,11 @@ CREATE TABLE password_reset( created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')), FOREIGN KEY(user_id) REFERENCES users(id) ); -CREATE TABLE github_repository_provider( - id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - display_name TEXT NOT NULL, - access_token TEXT -); CREATE TABLE gitlab_repository_provider( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, display_name TEXT NOT NULL, - access_token TEXT + access_token TEXT, + synced_at TIMESTAMP ); CREATE TABLE gitlab_provided_repositories( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, diff --git a/ee/tabby-db/schema/schema.svg b/ee/tabby-db/schema/schema.svg index 096664001962..adb349a8a540 100644 --- a/ee/tabby-db/schema/schema.svg +++ b/ee/tabby-db/schema/schema.svg @@ -128,6 +128,10 @@   access_token + +  + +synced_at @@ -186,6 +190,10 @@   access_token + +  + +synced_at diff --git a/ee/tabby-webserver/graphql/schema.graphql b/ee/tabby-webserver/graphql/schema.graphql index 0f940e9425bd..f386e0cece92 100644 --- a/ee/tabby-webserver/graphql/schema.graphql +++ b/ee/tabby-webserver/graphql/schema.graphql @@ -13,7 +13,7 @@ input UpdateRepositoryProviderInput { type GitlabRepositoryProvider { id: ID! displayName: String! - connected: Boolean! + status: RepositoryProviderStatus! } enum Language { @@ -119,6 +119,12 @@ type UserConnection { pageInfo: PageInfo! } +enum RepositoryProviderStatus { + READY + PENDING + ERROR +} + type DiskUsageStats { events: DiskUsage! indexedRepositories: DiskUsage! @@ -142,7 +148,7 @@ type ServerInfo { type GithubRepositoryProvider { id: ID! displayName: String! - connected: Boolean! + status: RepositoryProviderStatus! } input PasswordChangeInput {