-
-
Save parzibyte/786f276bd9a6c94d826304e6bb3cb2d8 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 IF NOT EXISTS productos( | |
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
nombre VARCHAR(255) NOT NULL, | |
descripcion VARCHAR(1024) NOT NULL, | |
precio DECIMAL(9,2) | |
); | |
CREATE TABLE IF NOT EXISTS carrito_usuarios( | |
id_sesion VARCHAR(255) NOT NULL, | |
id_producto BIGINT UNSIGNED NOT NULL, | |
FOREIGN KEY (id_producto) REFERENCES productos(id) | |
ON UPDATE CASCADE ON DELETE CASCADE | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment