From 0d460c3e1636454630aba37b4285d6d59c2c5122 Mon Sep 17 00:00:00 2001 From: WhereAreBugs <2572414306@qq.com> Date: Fri, 1 Dec 2023 17:52:51 +0800 Subject: [PATCH] make the data not null Signed-off-by: WhereAreBugs <2572414306@qq.com> --- internal/storage/sql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/storage/sql.go b/internal/storage/sql.go index 3e20c47b2..2cbc6df08 100644 --- a/internal/storage/sql.go +++ b/internal/storage/sql.go @@ -118,7 +118,7 @@ var ( pool TEXT NULL, create_time DATE NOT NULL, current INTEGER DEFAULT 0, - type TEXT NULL + type TEXT NOT NULL ) ` @@ -131,7 +131,7 @@ var ( CheckCluster = `SELECT COUNT(*) FROM pragma_table_info('clusters') WHERE name = 'type'` // update new cluster column - UpdateCluster = `ALTER TABLE clusters ADD COLUMN type TEXT NULL default 'develop'` + UpdateCluster = `ALTER TABLE clusters ADD COLUMN type TEXT NOT NULL default 'develop'` // delete cluster DeleteCluster = `DELETE from clusters WHERE name = ?`