Skip to content

Commit

Permalink
Merge pull request #25 from go-park-mail-ru/task/email
Browse files Browse the repository at this point in the history
added email field to users
  • Loading branch information
mevain authored Oct 25, 2024
2 parents 532fb81 + 4333caa commit 3ec0629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
go.mod
2024-2-Zdes-budet-nazvanie-UykwHnIE.crt
2024-2-Zdes-budet-nazvanie-UykwHnIE.crt
data/
3 changes: 2 additions & 1 deletion db/migrations/01_up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CREATE TABLE IF NOT EXISTS users
(
id SERIAL PRIMARY KEY, -- Уникальный идентификатор пользователя
login VARCHAR(255) NOT NULL UNIQUE, -- Логин пользователя
email TEXT NOT NULL,
password VARCHAR(255) NOT NULL, -- Хэш пароля
created_at TIMESTAMP NOT NULL DEFAULT NOW() -- Дата создания пользователя
);
Expand Down Expand Up @@ -76,4 +77,4 @@ CREATE TABLE IF NOT EXISTS trips_places ( --таблица для сопоста
created_at TIMESTAMP NOT NULL DEFAULT NOW(), -- Дата создания записи
FOREIGN KEY (trip_id) REFERENCES trips(id) ON DELETE CASCADE,
FOREIGN KEY (place_id) REFERENCES places(id) ON DELETE CASCADE
);
);

0 comments on commit 3ec0629

Please sign in to comment.