Skip to content
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

fix some migrations #191

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions frontend/lib/db/migrations/0004_worthless_kitty_pryde.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ CREATE TABLE IF NOT EXISTS "datapoint_to_span" (
CONSTRAINT "datapoint_to_span_pkey" PRIMARY KEY("datapoint_id","span_id","project_id")
);
--> statement-breakpoint
ALTER TABLE "labeling_queue_items" DROP CONSTRAINT "labelling_queue_data_queue_id_fkey";
--> statement-breakpoint
ALTER TABLE "labels" ALTER COLUMN "value" SET NOT NULL;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "datapoint_to_span" ADD CONSTRAINT "datapoint_to_span_datapoint_id_fkey" FOREIGN KEY ("datapoint_id") REFERENCES "public"."dataset_datapoints"("id") ON DELETE cascade ON UPDATE cascade;
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/db/migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,8 @@
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change here is incorrect. The foreign key name should be labeling_queue_items_queue_id_fkey instead of labelling_queue_items_queue_id_fkey.

"indexes": {},
"foreignKeys": {
"labelling_queue_data_queue_id_fkey": {
"name": "labelling_queue_data_queue_id_fkey",
"labeling_queue_items_queue_id_fkey": {
"name": "labelling_queue_items_queue_id_fkey",
"tableFrom": "labeling_queue_items",
"tableTo": "labeling_queues",
"columnsFrom": [
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/db/migrations/meta/0003_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,8 @@
},
"indexes": {},
"foreignKeys": {
"labelling_queue_data_queue_id_fkey": {
"name": "labelling_queue_data_queue_id_fkey",
"labelling_queue_items_queue_id_fkey": {
"name": "llabelling_queue_items_queue_id_fkey",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in foreign key name: llabelling_queue_items_queue_id_fkey should be labeling_queue_items_queue_id_fkey. This typo is also present in 0002_snapshot.json.

Suggested change
"name": "llabelling_queue_items_queue_id_fkey",
"name": "labeling_queue_items_queue_id_fkey",

"tableFrom": "labeling_queue_items",
"tableTo": "labeling_queues",
"columnsFrom": [
Expand Down