dbinit.sqlite3.script 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. CREATE TABLE user (
  2. id integer PRIMARY KEY,
  3. name text,
  4. password text
  5. );
  6. INSERT INTO user (name, password) VALUES ('erinn','$2y$10$n5ajLY.kMZVjLCNsUuPXFO70VUYLoolpQRGl3RCXOBVIaY4/peWXS');
  7. CREATE TABLE category (
  8. id integer PRIMARY KEY,
  9. name text,
  10. orderby integer
  11. );
  12. INSERT INTO category (name, orderby) VALUES
  13. ('Basics', 1),
  14. ('Spoofs', 2),
  15. ('Denial of Service', 3),
  16. ('Attacks', 4)
  17. ;
  18. CREATE TABLE level (
  19. id integer PRIMARY KEY,
  20. category_id integer,
  21. name text,
  22. orderby integer,
  23. filename text
  24. );
  25. INSERT INTO level (category_id, name, orderby, filename) VALUES
  26. (1, 'Basics 1', 1, '01 Basics/level01'),
  27. (1, 'Basics 2', 2, '01 Basics/level02'),
  28. (1, 'Basics 3', 3, '01 Basics/level03'),
  29. (1, 'Basics 4', 4, '01 Basics/level04'),
  30. (1, 'Basics 5', 5, '01 Basics/level05'),
  31. (2, 'Spoofs 1', 1, '02 Spoofs/spoofs01'),
  32. (2, 'Spoofs 2', 2, '02 Spoofs/spoofs02'),
  33. (3, 'DoS 1', 1, '03 DoS/dos01'),
  34. (3, 'DoS 2', 2, '03 DoS/dos02'),
  35. (3, 'DoS 3', 3, '03 DoS/dos03'),
  36. (4, 'Attacks 1', 1, '04 Attacks/attacks01')
  37. ;
  38. CREATE TABLE solns (
  39. id integer PRIMARY KEY,
  40. user_id integer,
  41. level_id integer,
  42. completed integer,
  43. json text
  44. );