diff --git a/db/post_migrate/20240704070311_add_stage_event_hashes_organization_id_foreign_key.rb b/db/post_migrate/20240704070311_add_stage_event_hashes_organization_id_foreign_key.rb
new file mode 100644
index 0000000000000000000000000000000000000000..026fbcb37af0761df076ad75dea782955daaf401
--- /dev/null
+++ b/db/post_migrate/20240704070311_add_stage_event_hashes_organization_id_foreign_key.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddStageEventHashesOrganizationIdForeignKey < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.2'
+
+  def up
+    add_concurrent_foreign_key :analytics_cycle_analytics_stage_event_hashes, :organizations, column: :organization_id,
+      on_delete: :cascade
+  end
+
+  def down
+    remove_foreign_key_if_exists :analytics_cycle_analytics_stage_event_hashes, column: :organization_id
+  end
+end
diff --git a/db/post_migrate/20240704111127_remove_default_value_from_vsa_stage_hashes_table.rb b/db/post_migrate/20240704111127_remove_default_value_from_vsa_stage_hashes_table.rb
new file mode 100644
index 0000000000000000000000000000000000000000..040f5e07a18f519b58be259d21d5d14f97d198b3
--- /dev/null
+++ b/db/post_migrate/20240704111127_remove_default_value_from_vsa_stage_hashes_table.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveDefaultValueFromVsaStageHashesTable < Gitlab::Database::Migration[2.2]
+  milestone '17.2'
+
+  def up
+    change_column_default :analytics_cycle_analytics_stage_event_hashes, :organization_id, nil
+  end
+
+  def down
+    change_column_default :analytics_cycle_analytics_stage_event_hashes, :organization_id, 1
+  end
+end
diff --git a/db/schema_migrations/20240704070311 b/db/schema_migrations/20240704070311
new file mode 100644
index 0000000000000000000000000000000000000000..25ff5e8a1ca3c36ca3da9f37178822a1621f0e0d
--- /dev/null
+++ b/db/schema_migrations/20240704070311
@@ -0,0 +1 @@
+b57add5352ed4723a1a0ed4a3e53829a6bd492fbfa903da35d0a02f5457efd84
\ No newline at end of file
diff --git a/db/schema_migrations/20240704111127 b/db/schema_migrations/20240704111127
new file mode 100644
index 0000000000000000000000000000000000000000..4868ee7a09dcd14ca1b0ac3f8c05dc8991301951
--- /dev/null
+++ b/db/schema_migrations/20240704111127
@@ -0,0 +1 @@
+2c40583211aacf8dc10f3e56545faf9211fc394ef6314af38181398b5fef0fbc
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 4a15b117d8016674cbb95eb578d432a8537ba1e3..1ffd0a848765be9110e2798624adaa6f2a572a9d 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -5018,7 +5018,7 @@ ALTER SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq OWNED BY ana
 CREATE TABLE analytics_cycle_analytics_stage_event_hashes (
     id bigint NOT NULL,
     hash_sha256 bytea,
-    organization_id bigint DEFAULT 1 NOT NULL
+    organization_id bigint NOT NULL
 );
 
 CREATE SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq
@@ -31819,6 +31819,9 @@ ALTER TABLE ONLY abuse_report_notes
 ALTER TABLE ONLY vulnerability_issue_links
     ADD CONSTRAINT fk_081e11030b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
 
+ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes
+    ADD CONSTRAINT fk_0839874e4f FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
+
 ALTER TABLE ONLY abuse_report_user_mentions
     ADD CONSTRAINT fk_088018ecd8 FOREIGN KEY (abuse_report_id) REFERENCES abuse_reports(id) ON DELETE CASCADE;
 
diff --git a/qa/gdk/Dockerfile.gdk.dockerignore b/qa/gdk/Dockerfile.gdk.dockerignore
index a5a27b1ac029a32a255f7cc5413a42237f2c3ca3..5d33c8ded67ca661a6ee39452dc137a02bc22d8c 100644
--- a/qa/gdk/Dockerfile.gdk.dockerignore
+++ b/qa/gdk/Dockerfile.gdk.dockerignore
@@ -34,6 +34,7 @@ tmp/*
 !tmp/sockets
 
 db/fixtures/
+!db/fixtures/development/01__default_organization.rb
 !db/fixtures/development/01_admin.rb
 !db/fixtures/development/02_application_settings.rb
 !db/fixtures/development/25_api_personal_access_token.rb