Files
ss-tools/specs/011-git-integration-dashboard/data-model.md
2026-01-22 23:59:16 +03:00

1.6 KiB

Data Model: Git Integration Plugin

Entities

GitServerConfig

  • id: UUID (Primary Key)
  • name: String (Display name)
  • provider: Enum (GITHUB, GITLAB, GITEA)
  • url: String (e.g., https://github.com)
  • pat: String (Encrypted/Sensitive)
  • default_repository: String (e.g., org/dashboards)
  • status: Enum (CONNECTED, FAILED, UNKNOWN)
  • last_validated: DateTime

GitRepository

  • id: UUID (Primary Key)
  • dashboard_id: Integer (Link to Superset Dashboard ID)
  • config_id: UUID (FK to GitServerConfig)
  • remote_url: String
  • local_path: String (Relative to backend storage)
  • current_branch: String
  • sync_status: Enum (CLEAN, DIRTY, CONFLICT)

Branch

  • name: String
  • commit_hash: String
  • is_remote: Boolean
  • last_updated: DateTime

Commit

  • hash: String (Primary Key)
  • author: String
  • email: String
  • timestamp: DateTime
  • message: String
  • files_changed: List[String]

Conflict

  • repository_id: UUID (FK to GitRepository)
  • file_path: String
  • our_content: String
  • their_content: String
  • base_content: String

DeploymentEnvironment

  • id: UUID (Primary Key)
  • name: String (e.g., Production, Staging)
  • superset_url: String
  • superset_token: String (Sensitive)
  • is_active: Boolean

Relationships

  • GitServerConfig (1) <-> (*) GitRepository
  • GitRepository (1) <-> (*) Branch
  • Branch (1) <-> (*) Commit
  • GitRepository (1) <-> (*) DeploymentEnvironment (Via deployment logs/config)