Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't drop `unregistered` column in reconnection support migration

Antonio Scandurra2697112a8a5e
diff --git a/crates/collab/migrations.sqlite/20221109000000_test_schema.sql b/crates/collab/migrations.sqlite/20221109000000_test_schema.sql
index 90fd8ace122..68caf4fad7f 100644
--- a/crates/collab/migrations.sqlite/20221109000000_test_schema.sql
+++ b/crates/collab/migrations.sqlite/20221109000000_test_schema.sql
@@ -44,7 +44,8 @@ CREATE TABLE "projects" (
"room_id" INTEGER REFERENCES rooms (id) NOT NULL,
"host_user_id" INTEGER REFERENCES users (id) NOT NULL,
"host_connection_id" INTEGER NOT NULL,
- "host_connection_epoch" TEXT NOT NULL
+ "host_connection_epoch" TEXT NOT NULL,
+ "unregistered" BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE INDEX "index_projects_on_host_connection_epoch" ON "projects" ("host_connection_epoch");
diff --git a/crates/collab/migrations/20221111092550_reconnection_support.sql b/crates/collab/migrations/20221111092550_reconnection_support.sql
index 5e8bada2f94..3289f6bbddb 100644
--- a/crates/collab/migrations/20221111092550_reconnection_support.sql
+++ b/crates/collab/migrations/20221111092550_reconnection_support.sql
@@ -6,8 +6,7 @@ CREATE TABLE IF NOT EXISTS "rooms" (
ALTER TABLE "projects"
ADD "room_id" INTEGER REFERENCES rooms (id),
ADD "host_connection_id" INTEGER,
- ADD "host_connection_epoch" UUID,
- DROP COLUMN "unregistered";
+ ADD "host_connection_epoch" UUID;
CREATE INDEX "index_projects_on_host_connection_epoch" ON "projects" ("host_connection_epoch");
CREATE TABLE "worktrees" (