some stuff from mac
This commit is contained in:
@@ -18,7 +18,7 @@ type Session struct {
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int32
|
||||
ID uuid.UUID
|
||||
Username string
|
||||
Password string
|
||||
CreatedAt time.Time
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
CREATE TABLE users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
username TEXT UNIQUE NOT NULL,
|
||||
password TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
@@ -10,4 +10,4 @@ CREATE TABLE sessions (
|
||||
user_id INTEGER NOT NULL REFERENCES users(id),
|
||||
expires_at TIMESTAMPTZ NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user