fix missing semicolon in Postgres script's files

This commit is contained in:
Александр Ангин 2018-01-22 10:40:11 +03:00
parent 75150d4a42
commit b892f566e5
5 changed files with 12 additions and 10 deletions

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 VARCHAR(50) ALTER TABLE repos ADD COLUMN repo_visibility VARCHAR(50);
-- name: update-table-set-repo-visibility -- name: update-table-set-repo-visibility
@ -8,4 +8,4 @@ UPDATE repos
SET repo_visibility = (CASE SET repo_visibility = (CASE
WHEN repo_private = false THEN 'public' WHEN repo_private = false THEN 'public'
ELSE 'private' ELSE 'private'
END) END);

View file

@ -8,9 +8,10 @@ UPDATE repos SET repo_counter = (
SELECT max(build_number) SELECT max(build_number)
FROM builds FROM builds
WHERE builds.build_repo_id = repos.repo_id WHERE builds.build_repo_id = repos.repo_id
) );
-- name: update-table-set-repo-seq-default -- name: update-table-set-repo-seq-default
UPDATE repos SET repo_counter = 0 UPDATE repos SET repo_counter = 0
WHERE repo_counter IS NULL WHERE repo_counter IS NULL
;

View file

@ -1,7 +1,7 @@
-- name: alter-table-add-repo-active -- name: alter-table-add-repo-active
ALTER TABLE repos ADD COLUMN repo_active BOOLEAN ALTER TABLE repos ADD COLUMN repo_active BOOLEAN;
-- name: update-table-set-repo-active -- name: update-table-set-repo-active
UPDATE repos SET repo_active = true UPDATE repos SET repo_active = true;

View file

@ -4,4 +4,4 @@ ALTER TABLE users ADD COLUMN user_synced INTEGER;
-- name: update-table-set-user-synced -- name: update-table-set-user-synced
UPDATE users SET user_synced = 0 UPDATE users SET user_synced = 0;

View file

@ -1,18 +1,18 @@
-- name: alter-table-add-file-pid -- name: alter-table-add-file-pid
ALTER TABLE files ADD COLUMN file_pid INTEGER ALTER TABLE files ADD COLUMN file_pid INTEGER;
-- name: alter-table-add-file-meta-passed -- name: alter-table-add-file-meta-passed
ALTER TABLE files ADD COLUMN file_meta_passed INTEGER ALTER TABLE files ADD COLUMN file_meta_passed INTEGER;
-- name: alter-table-add-file-meta-failed -- name: alter-table-add-file-meta-failed
ALTER TABLE files ADD COLUMN file_meta_failed INTEGER ALTER TABLE files ADD COLUMN file_meta_failed INTEGER;
-- name: alter-table-add-file-meta-skipped -- name: alter-table-add-file-meta-skipped
ALTER TABLE files ADD COLUMN file_meta_skipped INTEGER ALTER TABLE files ADD COLUMN file_meta_skipped INTEGER;
-- name: alter-table-update-file-meta -- name: alter-table-update-file-meta
@ -20,3 +20,4 @@ UPDATE files SET
file_meta_passed=0 file_meta_passed=0
,file_meta_failed=0 ,file_meta_failed=0
,file_meta_skipped=0 ,file_meta_skipped=0
;