Skip to content

Commit

Permalink
make the data not null
Browse files Browse the repository at this point in the history
Signed-off-by: WhereAreBugs <[email protected]>
  • Loading branch information
WhereAreBugs committed Dec 1, 2023
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
Expand Up @@ -118,7 +118,7 @@ var (
pool TEXT NULL,
create_time DATE NOT NULL,
current INTEGER DEFAULT 0,
type TEXT NULL
type TEXT NOT NULL
)
`

Expand All @@ -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 = ?`
Expand Down

0 comments on commit 0d460c3

Please sign in to comment.