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 <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
This commit is contained in:
Julie Qiu 2020-10-26 09:13:45 -04:00
Родитель 5df6d8771b
Коммит e6f91f6d17
2 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,12 @@
-- Copyright 2020 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
ALTER TABLE licenses
ADD CONSTRAINT licenses_module_path_fkey
FOREIGN KEY (module_path, version)
REFERENCES modules(module_path, version) ON DELETE CASCADE;
END;

Просмотреть файл

@ -0,0 +1,9 @@
-- Copyright 2020 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
ALTER TABLE licenses DROP CONSTRAINT IF EXISTS licenses_module_path_fkey;
END;