Skip to content

Instantly share code, notes, and snippets.

View CodingMarin's full-sized avatar
🏠
Working from home

Alexander M. Marin CodingMarin

🏠
Working from home
View GitHub Profile
@CodingMarin
CodingMarin / .js
Created February 6, 2025 21:55
Automatitation for postman service
if (pm.response.code === 200) {
const responseData = pm.response.json();
const token = responseData.token; // Replace with you value <token>
pm.environment.set("auth_token", token); // {{auth_token}}
console.log("Token saved:", token);
} else {
console.error("Error in response:", pm.response.text());
}
@CodingMarin
CodingMarin / .sql
Last active February 20, 2025 15:21
TGP
CREATE TABLE requerimiento_geotecnia_ficha(
requerimiento_geotecnia_ficha_id SERIAL PRIMARY KEY,
requerimiento_geotecnia_id INTEGER REFERENCES requerimiento_geotecnia(requerimiento_geotecnia_id),
ficha_url VARCHAR(255),
soft_delete BOOLEAN DEFAULT false,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
CREATE TRIGGER update_requerimiento_geotecnia_ficha_updated_at