Revert "updates on the otp updates on the customer app"
This reverts commit 89321c9e06.
This commit is contained in:
@@ -6,21 +6,12 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Built from the environment, not hardcoded. This line used to carry the
|
||||
// production host and password in plaintext, in a file tracked by git — so
|
||||
// the live database credential shipped with every clone. Export DB_HOST,
|
||||
// DB_USER, DB_PASSWORD, DB_NAME and DB_PORT (or source .env) before running.
|
||||
dsn := fmt.Sprintf(
|
||||
"host=%s user=%s password=%s dbname=%s port=%s sslmode=disable",
|
||||
os.Getenv("DB_HOST"), os.Getenv("DB_USER"), os.Getenv("DB_PASSWORD"),
|
||||
os.Getenv("DB_NAME"), os.Getenv("DB_PORT"),
|
||||
)
|
||||
dsn := "host=31.97.228.132 user=admin password=Package@321# dbname=logistics port=5433 sslmode=disable"
|
||||
db, err := sql.Open("postgres", dsn)
|
||||
if err != nil {
|
||||
log.Fatalf("Open failed: %v", err)
|
||||
@@ -90,4 +81,4 @@ func main() {
|
||||
db.Exec("DELETE FROM pickupbookings WHERE bookingno = 'DM-BK-DEBUG-001'")
|
||||
fmt.Println("Cleaned up test row.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,21 +6,12 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Built from the environment, not hardcoded. This line used to carry the
|
||||
// production host and password in plaintext, in a file tracked by git — so
|
||||
// the live database credential shipped with every clone. Export DB_HOST,
|
||||
// DB_USER, DB_PASSWORD, DB_NAME and DB_PORT (or source .env) before running.
|
||||
dsn := fmt.Sprintf(
|
||||
"host=%s user=%s password=%s dbname=%s port=%s sslmode=disable",
|
||||
os.Getenv("DB_HOST"), os.Getenv("DB_USER"), os.Getenv("DB_PASSWORD"),
|
||||
os.Getenv("DB_NAME"), os.Getenv("DB_PORT"),
|
||||
)
|
||||
dsn := "host=31.97.228.132 user=admin password=Package@321# dbname=logistics port=5433 sslmode=disable"
|
||||
db, err := sql.Open("postgres", dsn)
|
||||
if err != nil {
|
||||
log.Fatalf("Open failed: %v", err)
|
||||
@@ -66,4 +57,4 @@ func main() {
|
||||
WHERE rel.relname = 'pickupbookings' AND con.contype = 'c'
|
||||
`).Scan(&def)
|
||||
fmt.Println("Current constraint:", def)
|
||||
}
|
||||
}
|
||||
@@ -6,22 +6,13 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// DSN matches the one in connect.go and .env
|
||||
// Built from the environment, not hardcoded. This line used to carry the
|
||||
// production host and password in plaintext, in a file tracked by git — so
|
||||
// the live database credential shipped with every clone. Export DB_HOST,
|
||||
// DB_USER, DB_PASSWORD, DB_NAME and DB_PORT (or source .env) before running.
|
||||
dsn := fmt.Sprintf(
|
||||
"host=%s user=%s password=%s dbname=%s port=%s sslmode=disable",
|
||||
os.Getenv("DB_HOST"), os.Getenv("DB_USER"), os.Getenv("DB_PASSWORD"),
|
||||
os.Getenv("DB_NAME"), os.Getenv("DB_PORT"),
|
||||
)
|
||||
dsn := "host=31.97.228.132 user=admin password=Package@321# dbname=logistics port=5433 sslmode=disable"
|
||||
db, err := sql.Open("postgres", dsn)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to open DB: %v", err)
|
||||
@@ -51,4 +42,4 @@ func main() {
|
||||
}
|
||||
fmt.Printf("Table: %s\n", name)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user