ops: live SMS creds on .13; seed-admin cmd in make db-up (admin survives DB resets)
This commit is contained in:
@@ -46,6 +46,12 @@ UPDATE tags SET status=$2, updated_at=now() WHERE id=$1;
|
||||
INSERT INTO tags (tag_code) VALUES ($1)
|
||||
RETURNING *;
|
||||
|
||||
-- name: UpsertAdmin :one
|
||||
INSERT INTO users (email, password_hash, name, is_admin)
|
||||
VALUES ($1, $2, $3, true)
|
||||
ON CONFLICT (email) DO UPDATE SET password_hash = EXCLUDED.password_hash, name = EXCLUDED.name, is_admin = true
|
||||
RETURNING *;
|
||||
|
||||
-- name: InsertScan :one
|
||||
INSERT INTO scans (tag_id, lat, lng, location_shared, scanner_phone, fingerprint, ip)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
|
||||
Reference in New Issue
Block a user