Skip to content

Commit e6f91f6

Browse files
committed
migrations: drop FK licenses_module_path_fkey
The licenses table currently has two FKs to modules. licenses_module_path_fkey is no longer needed and is dropped. For golang/go#39629 Change-Id: Ibf5a6400b1cf90e82748dcc53f45d23fdc29286d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265077 Trust: Julie Qiu <[email protected]> Run-TryBot: Julie Qiu <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
1 parent 5df6d87 commit e6f91f6

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- Copyright 2020 The Go Authors. All rights reserved.
2+
-- Use of this source code is governed by a BSD-style
3+
-- license that can be found in the LICENSE file.
4+
5+
BEGIN;
6+
7+
ALTER TABLE licenses
8+
ADD CONSTRAINT licenses_module_path_fkey
9+
FOREIGN KEY (module_path, version)
10+
REFERENCES modules(module_path, version) ON DELETE CASCADE;
11+
12+
END;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- Copyright 2020 The Go Authors. All rights reserved.
2+
-- Use of this source code is governed by a BSD-style
3+
-- license that can be found in the LICENSE file.
4+
5+
BEGIN;
6+
7+
ALTER TABLE licenses DROP CONSTRAINT IF EXISTS licenses_module_path_fkey;
8+
9+
END;

0 commit comments

Comments
 (0)