-
Notifications
You must be signed in to change notification settings - Fork 106
Add tenant ID concept into web app and backend #160
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9e5a6fd
hacked together a example of using zoekt grpc api
brendan-kellam 9a77ee0
provide tenant id to zoekt git indexer
brendan-kellam 8112153
update zoekt version to point to multitenant branch
brendan-kellam b153dd2
Merge branch 'main' into multi_tenancy_experiments
msukkari f6a3c00
merge main into mt branch
msukkari 338a3b6
pipe tenant id through header to zoekt
msukkari f0408c0
remove incorrect submodule reference and settings typo
msukkari f5a602f
update zoekt commit
msukkari 668e21b
remove unused yarn script
msukkari 8f38153
remove unused grpc client in web server
msukkari fa29817
remove unneeded deps and improve tenant id log
msukkari fdc4aac
merge v3 into mt branch
msukkari 3c9d36e
pass tenant id when creating repo in db
msukkari 3b6bfd3
Merge branch 'v3' into multi_tenancy_experiments
msukkari 4fad4c5
add mt yarn script
msukkari d14d5a9
add nocheckin comment to tenant id in v2 schema
msukkari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/db/prisma/migrations/20250114222109_add_tenant_id_to_repo/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Warnings: | ||
|
||
- Added the required column `tenantId` to the `Repo` table without a default value. This is not possible if the table is not empty. | ||
|
||
*/ | ||
-- RedefineTables | ||
PRAGMA defer_foreign_keys=ON; | ||
PRAGMA foreign_keys=OFF; | ||
CREATE TABLE "new_Repo" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"name" TEXT NOT NULL, | ||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" DATETIME NOT NULL, | ||
"indexedAt" DATETIME, | ||
"isFork" BOOLEAN NOT NULL, | ||
"isArchived" BOOLEAN NOT NULL, | ||
"metadata" JSONB NOT NULL, | ||
"cloneUrl" TEXT NOT NULL, | ||
"tenantId" INTEGER NOT NULL, | ||
"external_id" TEXT NOT NULL, | ||
"external_codeHostType" TEXT NOT NULL, | ||
"external_codeHostUrl" TEXT NOT NULL | ||
); | ||
INSERT INTO "new_Repo" ("cloneUrl", "createdAt", "external_codeHostType", "external_codeHostUrl", "external_id", "id", "indexedAt", "isArchived", "isFork", "metadata", "name", "updatedAt") SELECT "cloneUrl", "createdAt", "external_codeHostType", "external_codeHostUrl", "external_id", "id", "indexedAt", "isArchived", "isFork", "metadata", "name", "updatedAt" FROM "Repo"; | ||
DROP TABLE "Repo"; | ||
ALTER TABLE "new_Repo" RENAME TO "Repo"; | ||
CREATE UNIQUE INDEX "Repo_external_id_external_codeHostUrl_key" ON "Repo"("external_id", "external_codeHostUrl"); | ||
PRAGMA foreign_keys=ON; | ||
PRAGMA defer_foreign_keys=OFF; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.