Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the data not null
Browse files Browse the repository at this point in the history
Signed-off-by: WhereAreBugs <[email protected]>
WhereAreBugs committed Dec 1, 2023

Unverified

This user has not yet uploaded their public signing key.
1 parent 3f6fc7e commit 0d460c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/storage/sql.go
Original file line number Diff line number Diff line change
@@ -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 = ?`

0 comments on commit 0d460c3

Please sign in to comment.