Skip to content

Instantly share code, notes, and snippets.

@PEKTOP
Created June 1, 2017 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PEKTOP/faa2270eec380d5995584517faa03c2f to your computer and use it in GitHub Desktop.
Save PEKTOP/faa2270eec380d5995584517faa03c2f to your computer and use it in GitHub Desktop.
coin32
CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(100) NOT NULL
);
CREATE TABLE `transactions` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`user_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`amount` decimal(8,2) NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment