Created
July 21, 2020 14:22
-
-
Save felipe-pita/81b86cf835852bc94b63e764acd1b901 to your computer and use it in GitHub Desktop.
versao 1
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 `user` ( | |
`id` int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
`email` varchar(100) NOT NULL, | |
`password` varchar(255) NOT NULL, | |
`first_name` varchar(255), | |
`last_name` varchar(255), | |
`created_at` datetime NOT NULL, | |
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
); | |
CREATE TABLE `billing` ( | |
`id` int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
`billing_first_name` varchar(255), | |
`billing_last_name` varchar(255), | |
`billing_cpf` char(14), | |
`billing_phone` varchar(20), | |
`billing_country` char(2), | |
`billing_postcode` varchar(255), #nao pode ser int devido aos cep estrangeiros | |
`billing_state` char(2), | |
`billing_city` varchar(255), | |
`billing_neighborhood` varchar(255), | |
`billing_street` varchar(255), #woo: billing_address_1 | |
`billing_complement` varchar(255), #woo: billing_address_2 | |
`billing_number` varchar(11), | |
); | |
CREATE TABLE `shipping` ( | |
`id` int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
`shipping_country` char(2), | |
`shipping_postcode` varchar(255), #nao pode ser int devido aos cep estrangeiros | |
`shipping_state` char(2), | |
`shipping_city` varchar(255), | |
`shipping_neighborhood` varchar(255), | |
`shipping_street` varchar(255), #woo: shipping_address_1 | |
`shipping_complement` varchar(255), #woo: shipping_address_2 | |
`shipping_number` varchar(11), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment