-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
70 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
CREATE SCHEMA `microexchange` ; | ||
|
||
CREATE TABLE `history` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`full` varchar(45) NOT NULL, | ||
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (`id`,`full`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=561 DEFAULT CHARSET=latin1; | ||
|
||
CREATE TABLE `orderbook` ( | ||
`order_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`order_type` varchar(4) NOT NULL, | ||
`product_name` varchar(10) NOT NULL, | ||
`price` int(11) NOT NULL, | ||
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (`order_id`,`order_type`,`price`,`product_name`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=233 DEFAULT CHARSET=latin1; | ||
|
||
CREATE TABLE `order_types` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`type` varchar(4) NOT NULL, | ||
PRIMARY KEY (`id`,`type`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; | ||
|
||
CREATE TABLE `products` ( | ||
`product_id` int(11) NOT NULL AUTO_INCREMENT, | ||
`product_name` varchar(45) NOT NULL, | ||
PRIMARY KEY (`product_id`,`product_name`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; | ||
|
||
INSERT INTO `microexchange`.`order_types` | ||
(`type`) | ||
VALUES | ||
('buy'), ('sell'); | ||
|
||
INSERT INTO `microexchange`.`products` | ||
( | ||
`product_name`) | ||
VALUES | ||
('wood'), ('stone'), ('gold'), ('oil'); |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"text" : "sell iron 99" | ||
"text" : "buy wood 21" | ||
} |