Last active
July 11, 2017 12:55
-
-
Save diegoicosta/c2ad798dca39b83c81fc44dec8a6422e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 database mini-paycom; | |
| CREATE TABLE mini-paycom.order ( | |
| id INT AUTO_INCREMENT NOT NULL, | |
| customer VARCHAR(100) NOT NULL, | |
| amount INT NOT NULL, | |
| created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| PRIMARY KEY (id) | |
| ); | |
| CREATE TABLE mini-paycom.payment ( | |
| id INT AUTO_INCREMENT NOT NULL, | |
| order_id INT NOT NULL, | |
| method VARCHAR(15) NOT NULL, | |
| amount INT NOT NULL, | |
| tax INT NOT NULL, | |
| status SMALLINT(1) NOT NULL, | |
| created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| PRIMARY KEY (id) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment