Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Remove last_login_ip from unused db abstraction

Cette révision appartient à :
PantsuDev 2017-06-03 19:12:16 +10:00
Parent bb301e4671
révision e90c2df2d9
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: C0A42175139840D6
2 fichiers modifiés avec 2 ajouts et 3 suppressions

Voir le fichier

@ -63,8 +63,8 @@ var statements = map[string]string{
queryGetUserByEmail: fmt.Sprintf("SELECT %s FROM %s WHERE email = $1", userSelectColumnsFull, tableUsers),
queryGetUserByName: fmt.Sprintf("SELECT %s FROM %s WHERE username = $1", userSelectColumnsFull, tableUsers),
queryGetUserByID: fmt.Sprintf("SELECT %s FROM %s WHERE user_id = $1", userSelectColumnsFull, tableUsers),
queryInsertUser: fmt.Sprintf("INSERT INTO %s (username, password, email, status, created_at, updated_at, last_login_at, last_login_ip, api_token, api_token_expires, language, md5 ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)", tableUsers),
queryUpdateUser: fmt.Sprintf("UPDATE %s SET (username = $2, password = $3 , email = $4, status = $5, updated_at = $6, last_login_at = $7 , last_login_ip = $8 , api_token = $9 , api_token_expiry = $10 , language = $11 , md5 = $12 ) WHERE user_id = $1", tableUsers),
queryInsertUser: fmt.Sprintf("INSERT INTO %s (username, password, email, status, created_at, updated_at, last_login_at, api_token, api_token_expires, language, md5 ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)", tableUsers),
queryUpdateUser: fmt.Sprintf("UPDATE %s SET (username = $2, password = $3 , email = $4, status = $5, updated_at = $6, last_login_at = $7 , lapi_token = $8 , api_token_expiry = $9 , language = $10 , md5 = $11 ) WHERE user_id = $1", tableUsers),
queryDeleteUserByID: fmt.Sprintf("DELETE FROM %s WHERE user_id = $1", tableUsers),
queryDeleteUserByEmail: fmt.Sprintf("DELETE FROM %s WHERE email = $1", tableUsers),
queryDeleteUserByToken: fmt.Sprintf("DELETE FROM %s WHERE api_token = $1", tableUsers),

Voir le fichier

@ -37,7 +37,6 @@ var tables = []createTable{
"created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL",
"updated_at TIMESTAMP WITHOUT TIME ZONE",
"last_login_at TIMESTAMP WITHOUT TIME ZONE",
"last_login_ip TEXT",
"api_token TEXT",
"api_token_expiry TIMESTAMP WITHOUT TIME ZONE NOT NULL",
"language TEXT",