migrations: make incompatible NOT NULL

Change the incompatible column in the module and module_version_states
table so it cannot be null.

Change-Id: Ie325a5eace7dd8d6308b9ac3ea1721874f7fe226
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/249117
Run-TryBot: Miguel Acero <acero@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Miguel Acero 2020-08-18 14:24:04 -04:00 коммит произвёл Jonathan Amsterdam
Родитель fa59886cd8
Коммит ea388d48fc
2 изменённых файлов: 20 добавлений и 0 удалений

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

@ -0,0 +1,10 @@
-- 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 modules ALTER COLUMN incompatible DROP NOT NULL;
ALTER TABLE module_version_states ALTER COLUMN incompatible DROP NOT NULL;
END;

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

@ -0,0 +1,10 @@
-- 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 modules ALTER COLUMN incompatible SET NOT NULL;
ALTER TABLE module_version_states ALTER COLUMN incompatible SET NOT NULL;
END;