Set default value of 1 for new not-null columns (#1097)

Use 1 since it's the constant singleton ID
This commit is contained in:
gbrodman 2021-04-20 15:25:20 -04:00 committed by GitHub
parent 127f6b1056
commit 41b5112e1d
2 changed files with 4 additions and 4 deletions

View file

@ -13,9 +13,9 @@
-- limitations under the License. -- limitations under the License.
ALTER TABLE "ServerSecret" DROP CONSTRAINT "ServerSecret_pkey"; ALTER TABLE "ServerSecret" DROP CONSTRAINT "ServerSecret_pkey";
ALTER TABLE "ServerSecret" ADD COLUMN id bigint NOT NULL; ALTER TABLE "ServerSecret" ADD COLUMN id bigint DEFAULT 1 NOT NULL;
ALTER TABLE "ServerSecret" ADD PRIMARY KEY(id); ALTER TABLE "ServerSecret" ADD PRIMARY KEY(id);
ALTER TABLE "TmchCrl" DROP CONSTRAINT "TmchCrl_pkey"; ALTER TABLE "TmchCrl" DROP CONSTRAINT "TmchCrl_pkey";
ALTER TABLE "TmchCrl" ADD COLUMN id bigint NOT NULL; ALTER TABLE "TmchCrl" ADD COLUMN id bigint DEFAULT 1 NOT NULL;
ALTER TABLE "TmchCrl" ADD PRIMARY KEY(id); ALTER TABLE "TmchCrl" ADD PRIMARY KEY(id);

View file

@ -949,7 +949,7 @@ ALTER SEQUENCE public."SafeBrowsingThreat_id_seq" OWNED BY public."Spec11ThreatM
CREATE TABLE public."ServerSecret" ( CREATE TABLE public."ServerSecret" (
secret uuid NOT NULL, secret uuid NOT NULL,
id bigint NOT NULL id bigint DEFAULT 1 NOT NULL
); );
@ -1057,7 +1057,7 @@ CREATE TABLE public."TmchCrl" (
certificate_revocations text NOT NULL, certificate_revocations text NOT NULL,
update_timestamp timestamp with time zone NOT NULL, update_timestamp timestamp with time zone NOT NULL,
url text NOT NULL, url text NOT NULL,
id bigint NOT NULL id bigint DEFAULT 1 NOT NULL
); );