Skip to content

Commit

Permalink
Add OrgId index to migration
Browse files Browse the repository at this point in the history
This was done by editing the migration by hand, which is only a good
idea if it has not yet been applied. But since running `skaffold delete`
will delete the DB and let it be re-created, this is not a major problem
since this PR is still in progress and has not yet been merged.
  • Loading branch information
rmunn committed Jun 11, 2024
1 parent ccea198 commit efe464d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: new[] { "OrgId", "ProjectId" },
unique: true);

migrationBuilder.CreateIndex(
name: "IX_OrgProjects_OrgId",
table: "OrgProjects",
column: "OrgId");

migrationBuilder.CreateIndex(
name: "IX_OrgProjects_ProjectId",
table: "OrgProjects",
Expand Down
2 changes: 2 additions & 0 deletions backend/LexData/Migrations/LexBoxDbContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasKey("Id");

b.HasIndex("OrgId");

b.HasIndex("ProjectId");

b.HasIndex("OrgId", "ProjectId")
Expand Down

0 comments on commit efe464d

Please sign in to comment.