mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-25 00:45:27 +00:00
Fixes https://github.com/zed-industries/zed/issues/35780 Collab schema migration PR: https://github.com/zed-industries/cloud/pull/3422 The corresponding database schema migration has been created in the Cloud repo and applied to the production database. Before, Zed scanned each and every entry in the tree down from the directory it was opened in, except gitignored files and scan exclusions. The approach is unchanged, if Zed detects it was open inside a git repository: e.g. the directory open in Zed contains `.git` directory. For the rest of the projects, 2 optimizations are made: * Limit the depth of file scan traversal. Now, `file_scan_depth` (default `5`) restricts Zed from traversing any directory that has same number or more segments in its file path. Such directories behave similar to gitignored directories: their contents is not available in file finder, project search and project panel, but can be lazily traversed when the directory is expanded (e.g. project panel expands it or a nested file is open by path via terminal, etc.) To indicate that to the users, a status entry is shown firs time the limitation is hit in the project: <img width="858" height="133" alt="image" src="https://github.com/user-attachments/assets/7da6cfbb-98b4-4cc3-bf2a-8902a9597a15" /> * During the scan, any git repositories that are not direct children of the directory open in Zed (depth >= 2), are traversed and indexed normally, but their git metadata is never fetched eagerly. Only when Zed opens a buffer from that repo the git metadata is fetched and applied. All that combined now uses a way more moderate amount of CPU and RAM when opening `~`: <img width="1717" height="368" alt="Screenshot 2026-08-13 at 17 43 53" src="https://github.com/user-attachments/assets/ec83e2a9-f7cc-452b-8eb7-af158284ca4e" /> File scan inclusions and exclusions are considered still for such projects. Set `file_scan_depth` to `0` to enable old behavior. The setting is supported in the project settings, so custom values can be set based on the project's structure. --- Release Notes: - Fixed Zed using a lot of memory and CPU in large, non-git-tracked, directory trees
435 lines
17 KiB
SQL
435 lines
17 KiB
SQL
-- WARNING: If you are modifying this file you MUST open a PR to the Cloud repository prior to merging any changes.
|
|
-- If you are not Zed staff you MUST coordinate with a staff member to apply the schema migrations before this PR is merged.
|
|
|
|
CREATE TABLE "users" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"admin" BOOLEAN,
|
|
"email_address" VARCHAR(255) DEFAULT NULL,
|
|
"name" TEXT,
|
|
"connected_once" BOOLEAN NOT NULL DEFAULT false,
|
|
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"metrics_id" TEXT,
|
|
"accepted_tos_at" TIMESTAMP WITHOUT TIME ZONE,
|
|
"custom_llm_monthly_allowance_in_cents" INTEGER
|
|
);
|
|
|
|
CREATE INDEX "index_users_on_email_address" ON "users" ("email_address");
|
|
|
|
CREATE TABLE "contacts" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"user_id_a" INTEGER NOT NULL,
|
|
"user_id_b" INTEGER NOT NULL,
|
|
"a_to_b" BOOLEAN NOT NULL,
|
|
"should_notify" BOOLEAN NOT NULL,
|
|
"accepted" BOOLEAN NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_contacts_user_ids" ON "contacts" ("user_id_a", "user_id_b");
|
|
|
|
CREATE INDEX "index_contacts_user_id_b" ON "contacts" ("user_id_b");
|
|
|
|
CREATE TABLE "rooms" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"live_kit_room" VARCHAR NOT NULL,
|
|
"environment" VARCHAR,
|
|
"channel_id" INTEGER REFERENCES channels (id) ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_rooms_on_channel_id" ON "rooms" ("channel_id");
|
|
|
|
CREATE TABLE "projects" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"room_id" INTEGER REFERENCES rooms (id) ON DELETE CASCADE,
|
|
"host_user_id" INTEGER,
|
|
"host_connection_id" INTEGER,
|
|
"host_connection_server_id" INTEGER REFERENCES servers (id) ON DELETE CASCADE,
|
|
"unregistered" BOOLEAN NOT NULL DEFAULT FALSE,
|
|
"windows_paths" BOOLEAN NOT NULL DEFAULT FALSE,
|
|
"features" TEXT NOT NULL DEFAULT ''
|
|
);
|
|
|
|
CREATE INDEX "index_projects_on_host_connection_server_id" ON "projects" ("host_connection_server_id");
|
|
|
|
CREATE INDEX "index_projects_on_host_connection_id_and_host_connection_server_id" ON "projects" ("host_connection_id", "host_connection_server_id");
|
|
|
|
CREATE TABLE "worktrees" (
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"id" INTEGER NOT NULL,
|
|
"root_name" VARCHAR NOT NULL,
|
|
"abs_path" VARCHAR NOT NULL,
|
|
"visible" BOOL NOT NULL,
|
|
"scan_id" INTEGER NOT NULL,
|
|
"is_complete" BOOL NOT NULL DEFAULT FALSE,
|
|
"completed_scan_id" INTEGER NOT NULL,
|
|
"root_repo_common_dir" VARCHAR,
|
|
PRIMARY KEY (project_id, id)
|
|
);
|
|
|
|
CREATE INDEX "index_worktrees_on_project_id" ON "worktrees" ("project_id");
|
|
|
|
CREATE TABLE "worktree_entries" (
|
|
"project_id" INTEGER NOT NULL,
|
|
"worktree_id" INTEGER NOT NULL,
|
|
"scan_id" INTEGER NOT NULL,
|
|
"id" INTEGER NOT NULL,
|
|
"is_dir" BOOL NOT NULL,
|
|
"path" VARCHAR NOT NULL,
|
|
"canonical_path" TEXT,
|
|
"inode" INTEGER NOT NULL,
|
|
"mtime_seconds" INTEGER NOT NULL,
|
|
"mtime_nanos" INTEGER NOT NULL,
|
|
"is_external" BOOL NOT NULL,
|
|
"is_ignored" BOOL NOT NULL,
|
|
"is_deleted" BOOL NOT NULL,
|
|
"is_hidden" BOOL NOT NULL,
|
|
"git_status" INTEGER,
|
|
"is_fifo" BOOL NOT NULL,
|
|
"is_unloaded" BOOL NOT NULL DEFAULT FALSE,
|
|
PRIMARY KEY (project_id, worktree_id, id),
|
|
FOREIGN KEY (project_id, worktree_id) REFERENCES worktrees (project_id, id) ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX "index_worktree_entries_on_project_id" ON "worktree_entries" ("project_id");
|
|
|
|
CREATE INDEX "index_worktree_entries_on_project_id_and_worktree_id" ON "worktree_entries" ("project_id", "worktree_id");
|
|
|
|
CREATE TABLE "project_repositories" (
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"abs_path" VARCHAR,
|
|
"id" INTEGER NOT NULL,
|
|
"entry_ids" VARCHAR,
|
|
"legacy_worktree_id" INTEGER,
|
|
"branch" VARCHAR,
|
|
"scan_id" INTEGER NOT NULL,
|
|
"is_deleted" BOOL NOT NULL,
|
|
"current_merge_conflicts" VARCHAR,
|
|
"merge_message" VARCHAR,
|
|
"branch_summary" VARCHAR,
|
|
"head_commit_details" VARCHAR,
|
|
"remote_upstream_url" VARCHAR,
|
|
"remote_origin_url" VARCHAR,
|
|
"linked_worktrees" VARCHAR,
|
|
"repository_dir_abs_path" VARCHAR,
|
|
"common_dir_abs_path" VARCHAR,
|
|
PRIMARY KEY (project_id, id)
|
|
);
|
|
|
|
CREATE INDEX "index_project_repositories_on_project_id" ON "project_repositories" ("project_id");
|
|
|
|
CREATE TABLE "project_repository_statuses" (
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"repository_id" INTEGER NOT NULL,
|
|
"repo_path" VARCHAR NOT NULL,
|
|
"status" INT8 NOT NULL,
|
|
"status_kind" INT4 NOT NULL,
|
|
"first_status" INT4 NULL,
|
|
"second_status" INT4 NULL,
|
|
"lines_added" INT4 NULL,
|
|
"lines_deleted" INT4 NULL,
|
|
"scan_id" INT8 NOT NULL,
|
|
"is_deleted" BOOL NOT NULL,
|
|
PRIMARY KEY (project_id, repository_id, repo_path)
|
|
);
|
|
|
|
CREATE INDEX "index_project_repos_statuses_on_project_id" ON "project_repository_statuses" ("project_id");
|
|
|
|
CREATE INDEX "index_project_repos_statuses_on_project_id_and_repo_id" ON "project_repository_statuses" ("project_id", "repository_id");
|
|
|
|
CREATE TABLE "worktree_settings_files" (
|
|
"project_id" INTEGER NOT NULL,
|
|
"worktree_id" INTEGER NOT NULL,
|
|
"path" VARCHAR NOT NULL,
|
|
"content" TEXT,
|
|
"kind" VARCHAR,
|
|
"outside_worktree" BOOL NOT NULL DEFAULT FALSE,
|
|
PRIMARY KEY (project_id, worktree_id, path),
|
|
FOREIGN KEY (project_id, worktree_id) REFERENCES worktrees (project_id, id) ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX "index_worktree_settings_files_on_project_id" ON "worktree_settings_files" ("project_id");
|
|
|
|
CREATE INDEX "index_worktree_settings_files_on_project_id_and_worktree_id" ON "worktree_settings_files" ("project_id", "worktree_id");
|
|
|
|
CREATE TABLE "worktree_diagnostic_summaries" (
|
|
"project_id" INTEGER NOT NULL,
|
|
"worktree_id" INTEGER NOT NULL,
|
|
"path" VARCHAR NOT NULL,
|
|
"language_server_id" INTEGER NOT NULL,
|
|
"error_count" INTEGER NOT NULL,
|
|
"warning_count" INTEGER NOT NULL,
|
|
"info_count" INTEGER NOT NULL DEFAULT 0,
|
|
PRIMARY KEY (project_id, worktree_id, path),
|
|
FOREIGN KEY (project_id, worktree_id) REFERENCES worktrees (project_id, id) ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX "index_worktree_diagnostic_summaries_on_project_id" ON "worktree_diagnostic_summaries" ("project_id");
|
|
|
|
CREATE INDEX "index_worktree_diagnostic_summaries_on_project_id_and_worktree_id" ON "worktree_diagnostic_summaries" ("project_id", "worktree_id");
|
|
|
|
CREATE TABLE "language_servers" (
|
|
"id" INTEGER NOT NULL,
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"name" VARCHAR NOT NULL,
|
|
"language_name" VARCHAR,
|
|
"capabilities" TEXT NOT NULL,
|
|
"worktree_id" BIGINT,
|
|
PRIMARY KEY (project_id, id)
|
|
);
|
|
|
|
CREATE INDEX "index_language_servers_on_project_id" ON "language_servers" ("project_id");
|
|
|
|
CREATE TABLE "project_collaborators" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"connection_id" INTEGER NOT NULL,
|
|
"connection_server_id" INTEGER NOT NULL REFERENCES servers (id) ON DELETE CASCADE,
|
|
"user_id" INTEGER NOT NULL,
|
|
"replica_id" INTEGER NOT NULL,
|
|
"is_host" BOOLEAN NOT NULL,
|
|
"committer_name" VARCHAR,
|
|
"committer_email" VARCHAR
|
|
);
|
|
|
|
CREATE INDEX "index_project_collaborators_on_project_id" ON "project_collaborators" ("project_id");
|
|
|
|
CREATE UNIQUE INDEX "index_project_collaborators_on_project_id_and_replica_id" ON "project_collaborators" ("project_id", "replica_id");
|
|
|
|
CREATE INDEX "index_project_collaborators_on_connection_server_id" ON "project_collaborators" ("connection_server_id");
|
|
|
|
CREATE INDEX "index_project_collaborators_on_connection_id" ON "project_collaborators" ("connection_id");
|
|
|
|
CREATE UNIQUE INDEX "index_project_collaborators_on_project_id_connection_id_and_server_id" ON "project_collaborators" (
|
|
"project_id",
|
|
"connection_id",
|
|
"connection_server_id"
|
|
);
|
|
|
|
CREATE TABLE "room_participants" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"room_id" INTEGER NOT NULL REFERENCES rooms (id),
|
|
"user_id" INTEGER NOT NULL,
|
|
"answering_connection_id" INTEGER,
|
|
"answering_connection_server_id" INTEGER REFERENCES servers (id) ON DELETE CASCADE,
|
|
"answering_connection_lost" BOOLEAN NOT NULL,
|
|
"location_kind" INTEGER,
|
|
"location_project_id" INTEGER,
|
|
"initial_project_id" INTEGER,
|
|
"calling_user_id" INTEGER NOT NULL,
|
|
"calling_connection_id" INTEGER NOT NULL,
|
|
"calling_connection_server_id" INTEGER REFERENCES servers (id) ON DELETE SET NULL,
|
|
"participant_index" INTEGER,
|
|
"role" TEXT,
|
|
"in_call" BOOLEAN NOT NULL DEFAULT FALSE
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_room_participants_on_user_id" ON "room_participants" ("user_id");
|
|
|
|
CREATE INDEX "index_room_participants_on_room_id" ON "room_participants" ("room_id");
|
|
|
|
CREATE INDEX "index_room_participants_on_answering_connection_server_id" ON "room_participants" ("answering_connection_server_id");
|
|
|
|
CREATE INDEX "index_room_participants_on_calling_connection_server_id" ON "room_participants" ("calling_connection_server_id");
|
|
|
|
CREATE INDEX "index_room_participants_on_answering_connection_id" ON "room_participants" ("answering_connection_id");
|
|
|
|
CREATE UNIQUE INDEX "index_room_participants_on_answering_connection_id_and_answering_connection_server_id" ON "room_participants" (
|
|
"answering_connection_id",
|
|
"answering_connection_server_id"
|
|
);
|
|
|
|
CREATE TABLE "servers" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"environment" VARCHAR NOT NULL
|
|
);
|
|
|
|
CREATE TABLE "followers" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"room_id" INTEGER NOT NULL REFERENCES rooms (id) ON DELETE CASCADE,
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"leader_connection_server_id" INTEGER NOT NULL REFERENCES servers (id) ON DELETE CASCADE,
|
|
"leader_connection_id" INTEGER NOT NULL,
|
|
"follower_connection_server_id" INTEGER NOT NULL REFERENCES servers (id) ON DELETE CASCADE,
|
|
"follower_connection_id" INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_followers_on_project_id_and_leader_connection_server_id_and_leader_connection_id_and_follower_connection_server_id_and_follower_connection_id" ON "followers" (
|
|
"project_id",
|
|
"leader_connection_server_id",
|
|
"leader_connection_id",
|
|
"follower_connection_server_id",
|
|
"follower_connection_id"
|
|
);
|
|
|
|
CREATE INDEX "index_followers_on_room_id" ON "followers" ("room_id");
|
|
|
|
CREATE TABLE "channels" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"name" VARCHAR NOT NULL,
|
|
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"visibility" VARCHAR NOT NULL,
|
|
"parent_path" TEXT NOT NULL,
|
|
"requires_zed_cla" BOOLEAN NOT NULL DEFAULT FALSE,
|
|
"channel_order" INTEGER NOT NULL DEFAULT 1
|
|
);
|
|
|
|
CREATE INDEX "index_channels_on_parent_path" ON "channels" ("parent_path");
|
|
|
|
CREATE INDEX "index_channels_on_parent_path_and_order" ON "channels" ("parent_path", "channel_order");
|
|
|
|
CREATE TABLE IF NOT EXISTS "channel_chat_participants" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"user_id" INTEGER NOT NULL,
|
|
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
|
|
"connection_id" INTEGER NOT NULL,
|
|
"connection_server_id" INTEGER NOT NULL REFERENCES servers (id) ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX "index_channel_chat_participants_on_channel_id" ON "channel_chat_participants" ("channel_id");
|
|
|
|
CREATE TABLE "channel_members" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
|
|
"user_id" INTEGER NOT NULL,
|
|
"role" VARCHAR NOT NULL,
|
|
"accepted" BOOLEAN NOT NULL DEFAULT false,
|
|
"updated_at" TIMESTAMP NOT NULL DEFAULT now
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_channel_members_on_channel_id_and_user_id" ON "channel_members" ("channel_id", "user_id");
|
|
|
|
CREATE TABLE "buffers" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
|
|
"epoch" INTEGER NOT NULL DEFAULT 0,
|
|
"latest_operation_epoch" INTEGER,
|
|
"latest_operation_replica_id" INTEGER,
|
|
"latest_operation_lamport_timestamp" INTEGER
|
|
);
|
|
|
|
CREATE INDEX "index_buffers_on_channel_id" ON "buffers" ("channel_id");
|
|
|
|
CREATE TABLE "buffer_operations" (
|
|
"buffer_id" INTEGER NOT NULL REFERENCES buffers (id) ON DELETE CASCADE,
|
|
"epoch" INTEGER NOT NULL,
|
|
"replica_id" INTEGER NOT NULL,
|
|
"lamport_timestamp" INTEGER NOT NULL,
|
|
"value" BLOB NOT NULL,
|
|
PRIMARY KEY (buffer_id, epoch, lamport_timestamp, replica_id)
|
|
);
|
|
|
|
CREATE TABLE "buffer_snapshots" (
|
|
"buffer_id" INTEGER NOT NULL REFERENCES buffers (id) ON DELETE CASCADE,
|
|
"epoch" INTEGER NOT NULL,
|
|
"text" TEXT NOT NULL,
|
|
"operation_serialization_version" INTEGER NOT NULL,
|
|
PRIMARY KEY (buffer_id, epoch)
|
|
);
|
|
|
|
CREATE TABLE "channel_buffer_collaborators" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
|
|
"connection_id" INTEGER NOT NULL,
|
|
"connection_server_id" INTEGER NOT NULL REFERENCES servers (id) ON DELETE CASCADE,
|
|
"connection_lost" BOOLEAN NOT NULL DEFAULT false,
|
|
"user_id" INTEGER NOT NULL,
|
|
"replica_id" INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE INDEX "index_channel_buffer_collaborators_on_channel_id" ON "channel_buffer_collaborators" ("channel_id");
|
|
|
|
CREATE UNIQUE INDEX "index_channel_buffer_collaborators_on_channel_id_and_replica_id" ON "channel_buffer_collaborators" ("channel_id", "replica_id");
|
|
|
|
CREATE INDEX "index_channel_buffer_collaborators_on_connection_server_id" ON "channel_buffer_collaborators" ("connection_server_id");
|
|
|
|
CREATE INDEX "index_channel_buffer_collaborators_on_connection_id" ON "channel_buffer_collaborators" ("connection_id");
|
|
|
|
CREATE UNIQUE INDEX "index_channel_buffer_collaborators_on_channel_id_connection_id_and_server_id" ON "channel_buffer_collaborators" (
|
|
"channel_id",
|
|
"connection_id",
|
|
"connection_server_id"
|
|
);
|
|
|
|
CREATE TABLE "observed_buffer_edits" (
|
|
"user_id" INTEGER NOT NULL,
|
|
"buffer_id" INTEGER NOT NULL REFERENCES buffers (id) ON DELETE CASCADE,
|
|
"epoch" INTEGER NOT NULL,
|
|
"lamport_timestamp" INTEGER NOT NULL,
|
|
"replica_id" INTEGER NOT NULL,
|
|
PRIMARY KEY (user_id, buffer_id)
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_observed_buffers_user_and_buffer_id" ON "observed_buffer_edits" ("user_id", "buffer_id");
|
|
|
|
CREATE TABLE "notification_kinds" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"name" VARCHAR NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_notification_kinds_on_name" ON "notification_kinds" ("name");
|
|
|
|
CREATE TABLE "notifications" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"created_at" TIMESTAMP NOT NULL default CURRENT_TIMESTAMP,
|
|
"recipient_id" INTEGER NOT NULL,
|
|
"kind" INTEGER NOT NULL REFERENCES notification_kinds (id),
|
|
"entity_id" INTEGER,
|
|
"content" TEXT,
|
|
"is_read" BOOLEAN NOT NULL DEFAULT FALSE,
|
|
"response" BOOLEAN
|
|
);
|
|
|
|
CREATE INDEX "index_notifications_on_recipient_id_is_read_kind_entity_id" ON "notifications" ("recipient_id", "is_read", "kind", "entity_id");
|
|
|
|
CREATE TABLE contributors (
|
|
user_id INTEGER,
|
|
signed_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (user_id)
|
|
);
|
|
|
|
CREATE TABLE extensions (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
external_id TEXT NOT NULL,
|
|
name TEXT NOT NULL,
|
|
latest_version TEXT NOT NULL,
|
|
total_download_count INTEGER NOT NULL DEFAULT 0
|
|
);
|
|
|
|
CREATE TABLE extension_versions (
|
|
extension_id INTEGER REFERENCES extensions (id),
|
|
version TEXT NOT NULL,
|
|
published_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
authors TEXT NOT NULL,
|
|
repository TEXT NOT NULL,
|
|
description TEXT NOT NULL,
|
|
schema_version INTEGER NOT NULL DEFAULT 0,
|
|
wasm_api_version TEXT,
|
|
download_count INTEGER NOT NULL DEFAULT 0,
|
|
provides_themes BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_icon_themes BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_languages BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_grammars BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_language_servers BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_context_servers BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_agent_servers BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_slash_commands BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_indexed_docs_providers BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_snippets BOOLEAN NOT NULL DEFAULT FALSE,
|
|
provides_debug_adapters BOOLEAN NOT NULL DEFAULT FALSE,
|
|
PRIMARY KEY (extension_id, version)
|
|
);
|
|
|
|
CREATE UNIQUE INDEX "index_extensions_external_id" ON "extensions" ("external_id");
|
|
|
|
CREATE INDEX "index_extensions_total_download_count" ON "extensions" ("total_download_count");
|
|
|
|
CREATE TABLE IF NOT EXISTS "breakpoints" (
|
|
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
"project_id" INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
|
"position" INTEGER NOT NULL,
|
|
"log_message" TEXT NULL,
|
|
"worktree_id" BIGINT NOT NULL,
|
|
"path" TEXT NOT NULL,
|
|
"kind" VARCHAR NOT NULL
|
|
);
|
|
|
|
CREATE INDEX "index_breakpoints_on_project_id" ON "breakpoints" ("project_id");
|