Advertisement
pcwizz

Untitled

Sep 4th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. create database what_is_optimum_age;
  2.  
  3. create user 'what_is_optimum_age'@'localhost' identified by 'password';
  4.  
  5. grant select, insert on what_is_optimum_age.* to 'what_is_optimum_age'@'localhost';
  6.  
  7. create table what_is_optimum_age.images (
  8. id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
  9. age TINYINT UNSIGNED NOT NULL
  10. );
  11.  
  12. create table what_is_optimum_age.responce (
  13. id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
  14. image_id SMALLINT UNSIGNED NOT NULL,
  15. score TINYINT UNSIGNED NOT NUll,
  16. datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  17. );
  18.  
  19. create table what_is_optimum_age.report (
  20. id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
  21. datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  22. body VARCHAR(255) NOT NULL
  23. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement