mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 01:38:11 +00:00
added code to prevent panic if /login is reached but no settings exist
minor styling. added success and fail message to top of /signup screen modified open_registration to boolean value in database
This commit is contained in:
@@ -49,7 +49,7 @@ insert into builds values (9, 3, 'node_0.80', 'Success', '2013-09-16 00:00:00','
|
||||
|
||||
-- insert default, dummy settings
|
||||
|
||||
insert into settings values (1,'','','','','','','','','','localhost:8080','http');
|
||||
insert into settings values (1,'','','','','','','','','','localhost:8080','http', 0);
|
||||
|
||||
-- add public & private keys to all repositories
|
||||
|
||||
|
@@ -127,7 +127,7 @@ CREATE TABLE settings (
|
||||
,smtp_password VARCHAR(1024)
|
||||
,hostname VARCHAR(1024)
|
||||
,scheme VARCHAR(5)
|
||||
,open_invitations INTEGER
|
||||
,open_invitations BOOLEAN
|
||||
);
|
||||
`
|
||||
|
||||
@@ -195,5 +195,9 @@ func Load(db *sql.DB) error {
|
||||
db.Exec(buildCommitIndex)
|
||||
db.Exec(buildSlugIndex)
|
||||
|
||||
// migrations for backward compatibility
|
||||
db.Exec("ALTER TABLE settings ADD COLUMN open_invitations BOOLEAN")
|
||||
db.Exec("UPDATE settings SET open_invitations=0 WHERE open_invitations IS NULL")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ CREATE TABLE settings (
|
||||
,smtp_password VARCHAR(1024)
|
||||
,hostname VARCHAR(1024)
|
||||
,scheme VARCHAR(5)
|
||||
,open_invitations INTEGER
|
||||
,open_invitations BOOLEAN
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX member_uix ON members (team_id, user_id);
|
||||
|
Reference in New Issue
Block a user