-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(harvard_merge): adjust
havard_id
column type, index
- Use better indexing approach - Use IntegerField - Make nullable
- Loading branch information
Showing
5 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
9 changes: 3 additions & 6 deletions
9
cl/search/migrations/0037_add_harvard_id_to_opinioncluster.sql
This file contains 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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
BEGIN; | ||
ALTER TABLE "search_opinioncluster" ADD COLUMN "harvard_id" varchar DEFAULT '0' NOT NULL; | ||
ALTER TABLE "search_opinioncluster" ALTER COLUMN "harvard_id" DROP DEFAULT; | ||
ALTER TABLE "search_opinionclusterevent" ADD COLUMN "harvard_id" varchar DEFAULT '0' NOT NULL; | ||
ALTER TABLE "search_opinionclusterevent" ALTER COLUMN "harvard_id" DROP DEFAULT; | ||
CREATE INDEX "search_opinioncluster_harvard_id_b7c3eb52" ON "search_opinioncluster" ("harvard_id"); | ||
CREATE INDEX "search_opinioncluster_harvard_id_b7c3eb52_like" ON "search_opinioncluster" ("harvard_id" varchar_pattern_ops); | ||
ALTER TABLE "search_opinioncluster" ADD COLUMN "harvard_id" integer NULL; | ||
ALTER TABLE "search_opinionclusterevent" ADD COLUMN "harvard_id" integer NULL; | ||
CREATE INDEX "search_opin_harvard_9f1d7e_idx" ON "search_opinioncluster" ("harvard_id"); | ||
COMMIT; |
6 changes: 2 additions & 4 deletions
6
cl/search/migrations/0037_add_harvard_id_to_opinioncluster_customers.sql
This file contains 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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
BEGIN; | ||
ALTER TABLE "search_opinioncluster" ADD COLUMN "harvard_id" varchar DEFAULT '0' NOT NULL; | ||
ALTER TABLE "search_opinioncluster" ALTER COLUMN "harvard_id" DROP DEFAULT; | ||
CREATE INDEX "search_opinioncluster_harvard_id_b7c3eb52" ON "search_opinioncluster" ("harvard_id"); | ||
CREATE INDEX "search_opinioncluster_harvard_id_b7c3eb52_like" ON "search_opinioncluster" ("harvard_id" varchar_pattern_ops); | ||
ALTER TABLE "search_opinioncluster" ADD COLUMN "harvard_id" integer NULL; | ||
CREATE INDEX "search_opin_harvard_9f1d7e_idx" ON "search_opinioncluster" ("harvard_id"); | ||
COMMIT; |
This file contains 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 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