-
-
Save parzibyte/2278a106445dbc2146f65bcf5d874b2c 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
CREATE TABLE usuarios( | |
id BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, | |
correo VARCHAR(255) NOT NULL, | |
palabra_secreta VARCHAR(255) NOT NULL | |
); | |
/* | |
Solo necesitamos el id del usuario, vamos a insertar | |
un valor cada vez que haya un login no exitoso, y | |
luego vamos a contar cuántos valores hay | |
*/ | |
CREATE TABLE intentos_usuarios( | |
id_usuario BIGINT UNSIGNED NOT NULL, | |
FOREIGN KEY (id_usuario) REFERENCES usuarios(id) ON DELETE CASCADE ON UPDATE CASCADE | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment