diff --git a/migrations/sqlite3/4_machine_column.sql b/migrations/sqlite3/4_machine_column.sql index 1b8aac2..4d090e1 100644 --- a/migrations/sqlite3/4_machine_column.sql +++ b/migrations/sqlite3/4_machine_column.sql @@ -1,11 +1,11 @@ -- +migrate Up -- SQL in section 'Up' is executed when this migration is applied -alter table users - add `machine` varchar(255); +alter table heartbeats + add column `machine` varchar(255); -- +migrate Down -- SQL section 'Down' is executed when this migration is rolled back -alter table users +alter table heartbeats drop column `machine`; \ No newline at end of file diff --git a/models/user.go b/models/user.go index f55c7d4..9a3101d 100644 --- a/models/user.go +++ b/models/user.go @@ -37,7 +37,7 @@ func (s *Signup) IsValid() bool { } func validateUsername(username string) bool { - return len(username) >= 3 + return len(username) >= 3 && username != "current" } func validatePassword(password string) bool { diff --git a/version.txt b/version.txt index b9268da..0bfbd57 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.8.1 \ No newline at end of file +1.8.2 \ No newline at end of file