зеркало из https://github.com/golang/pkgsite.git
migrations: add package_symbols.id_bigint
The rate of growth for the package_symbols table suggests that the id column might hit the INTEGER limit as the size of our database grows. We change this to a BIGINT column now, since its easier to make this change before this table is used in prod. Change-Id: Ia2f31d87b97392d2ff83c8a2e07ebad6076ee9fe Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302669 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Родитель
c269e808f7
Коммит
4ccb176072
|
@ -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.
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE documentation_symbols
|
||||
ADD CONSTRAINT documentation_symbols_package_symbol_id_fkey
|
||||
FOREIGN KEY (package_symbol_id) REFERENCES package_symbols(id);
|
||||
|
||||
ALTER TABLE package_symbols DROP COLUMN id_bigint;
|
||||
|
||||
END;
|
|
@ -0,0 +1,10 @@
|
|||
-- 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.
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE documentation_symbols DROP CONSTRAINT documentation_symbols_package_symbol_id_fkey;
|
||||
ALTER TABLE package_symbols ADD COLUMN id_bigint bigint;
|
||||
|
||||
END;
|
Загрузка…
Ссылка в новой задаче