change repo_visibility to text

This commit is contained in:
Brad Rydzewski 2017-05-22 23:16:42 +02:00
parent c64a244c27
commit 9ed9f8f1c9
6 changed files with 8 additions and 8 deletions

View file

@ -456,7 +456,7 @@ CREATE INDEX sender_repo_ix ON senders (sender_repo_id);
// //
var alterTableAddRepoVisibility = ` var alterTableAddRepoVisibility = `
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility VARCHAR(50)
` `
var updateTableSetRepoVisibility = ` var updateTableSetRepoVisibility = `

View file

@ -1,6 +1,6 @@
-- name: alter-table-add-repo-visibility -- name: alter-table-add-repo-visibility
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility VARCHAR(50)
-- name: update-table-set-repo-visibility -- name: update-table-set-repo-visibility

View file

@ -456,13 +456,13 @@ CREATE INDEX IF NOT EXISTS sender_repo_ix ON senders (sender_repo_id);
// //
var alterTableAddRepoVisibility = ` var alterTableAddRepoVisibility = `
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility VARCHAR(50)
` `
var updateTableSetRepoVisibility = ` var updateTableSetRepoVisibility = `
UPDATE repos UPDATE repos
SET repo_visibility = (CASE SET repo_visibility = (CASE
WHEN repo_private = 0 THEN 'public' WHEN repo_private = true THEN 'public'
ELSE 'private' ELSE 'private'
END) END)
` `

View file

@ -1,11 +1,11 @@
-- name: alter-table-add-repo-visibility -- name: alter-table-add-repo-visibility
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility VARCHAR(50)
-- name: update-table-set-repo-visibility -- name: update-table-set-repo-visibility
UPDATE repos UPDATE repos
SET repo_visibility = (CASE SET repo_visibility = (CASE
WHEN repo_private = 0 THEN 'public' WHEN repo_private = true THEN 'public'
ELSE 'private' ELSE 'private'
END) END)

View file

@ -457,7 +457,7 @@ CREATE INDEX IF NOT EXISTS sender_repo_ix ON senders (sender_repo_id);
// //
var alterTableAddRepoVisibility = ` var alterTableAddRepoVisibility = `
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility TEXT
` `
var updateTableSetRepoVisibility = ` var updateTableSetRepoVisibility = `

View file

@ -1,6 +1,6 @@
-- name: alter-table-add-repo-visibility -- name: alter-table-add-repo-visibility
ALTER TABLE repos ADD COLUMN repo_visibility INTEGER ALTER TABLE repos ADD COLUMN repo_visibility TEXT
-- name: update-table-set-repo-visibility -- name: update-table-set-repo-visibility