sql migration need add uuid-ossp extention

This commit is contained in:
valitovgaziz
2024-08-13 14:30:45 +05:00
parent 9966c3f6ee
commit 2a3c5c8f64
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -31,6 +31,8 @@ func InitChiRouting() {
w.Write([]byte("welcome developer! Cool.")) w.Write([]byte("welcome developer! Cool."))
}) })
r.Post("/signin", auth.Register)
r.Route("/auth", func(r chi.Router) { r.Route("/auth", func(r chi.Router) {
r.Post("/register", auth.Register) r.Post("/register", auth.Register)
r.Post("/login", auth.Login) r.Post("/login", auth.Login)
+12
View File
@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS users(
id UUID NOT NULL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
password VARCHAR(500) NOT NULL,
phone VARCHAR(50)
);
DROP TABLE IF EXISTS users;