-
-
Save parzibyte/c1ce0f92b75c230b150adc96d6856304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func crearCurpSiNoExiste() error { | |
existeCurp, err := existeColumnaEnTabla("alumnos", "curp") | |
if err != nil { | |
return err | |
} | |
if existeCurp { | |
// Si ya existe no es necesario continuar | |
return nil | |
} | |
bd, err := obtenerBaseDeDatos() | |
if err != nil { | |
return err | |
} | |
defer bd.Close() | |
_, err = bd.Exec(`ALTER TABLE alumnos ADD curp TEXT NOT NULL DEFAULT "";`) | |
return err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment