migrations: add num_packages column to module_version_states

The num_packages column is added to module_version_states to keep track
of how many packages there are per module.

This will be used for figuring out the order in which packages will be
reprocessed.

Change-Id: Ifaf011722700ce8fe26446952729eecbcbff13e2
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/725326
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Julie Qiu 2020-04-22 12:55:56 -04:00 коммит произвёл Julie Qiu
Родитель 8092390a55
Коммит 0cced4ad6b
2 изменённых файлов: 18 добавлений и 0 удалений

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

@ -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 module_version_states DROP COLUMN num_packages;
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 module_version_states ADD COLUMN num_packages INTEGER;
END;