зеркало из https://github.com/golang/pkgsite.git
migrations: validate constraints
Validate the constraints we established in the previous migration. Change-Id: I3196bd9012ea20c32d2a0573c78c992d3ff212e8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/321430 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Родитель
b56e307880
Коммит
8fe1d5cfbc
|
@ -0,0 +1,5 @@
|
|||
-- Copyright 2021 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.
|
||||
|
||||
-- Nothing to do.
|
|
@ -0,0 +1,13 @@
|
|||
-- Copyright 2021 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.
|
||||
|
||||
-- These commands won't fail and should only set an internal bit in the DB marking the
|
||||
-- constraint as valid.
|
||||
-- They don't need to be run in a transaction.
|
||||
-- See https://www.postgresql.org/docs/12/sql-altertable.html, search for VALIDATE CONSTRAINT.
|
||||
|
||||
ALTER TABLE symbol_history VALIDATE CONSTRAINT "symbol_history_module_path_id_fkey";
|
||||
ALTER TABLE symbol_history VALIDATE CONSTRAINT "symbol_history_package_path_id_fkey";
|
||||
ALTER TABLE symbol_search_documents VALIDATE CONSTRAINT "symbol_search_documents_package_path_id_fkey";
|
||||
ALTER TABLE latest_module_versions VALIDATE CONSTRAINT "latest_module_versions_module_path_id_fkey";
|
Загрузка…
Ссылка в новой задаче