--users
INSERT INTO users(created_at, name, password) VALUES ('NOW', 'demo','$2a$10$7mfCBxBwIzXDU6r9az26o.zPX/r6IlNZVfU9zxSoLVtc0kRPimzba');
INSERT INTO users(created_at, name, password) VALUES ('NOW', 'demo2','$2a$10$7mfCBxBwIzXDU6r9az26o.zPX/r6IlNZVfU9zxSoLVtc0kRPimzba');

-- cover
INSERT INTO static_files(name, path) VALUES ('odingosochateaux.jpg', 'odingosochateaux.jpg');
INSERT INTO static_files(name, path) VALUES ('le-petit-bleu-de-la-cote-ouest.jpg', 'le-petit-bleu-de-la-cote-ouest.jpg');
INSERT INTO static_files(name, path) VALUES ('dunchateaulautre.jpg', 'dunchateaulautre.jpg');
INSERT INTO static_files(name, path) VALUES ('lesdieuxontsoif.jpg', 'lesdieuxontsoif.jpg');
INSERT INTO static_files(name, path) VALUES ('rigodon.jpg', 'rigodon.jpg');
INSERT INTO static_files(name, path) VALUES ('Un_barrage_contre_le_Pacifique.jpg', 'Un_barrage_contre_le_Pacifique.jpg');
INSERT INTO static_files(name, path) VALUES ('salammbo.jpg', 'salammbo.jpg');
INSERT INTO static_files(name, path) VALUES ('Langage Machine.jpg', 'Langage Machine.jpg');
INSERT INTO static_files(name, path) VALUES ('lavilleetleschiens.jpg', 'lavilleetleschiens.jpg');
INSERT INTO static_files(name, path) VALUES ('la-fille-du-capitaine.jpg', 'la-fille-du-capitaine.jpg');
INSERT INTO static_files(name, path) VALUES ('Aurélien.jpg', 'Aurélien.jpg');
INSERT INTO static_files(name, path) VALUES ('duo.jpg', 'duo.jpg');
INSERT INTO static_files(name, path) VALUES ('gargantua.jpg', 'gargantua.jpg');
INSERT INTO static_files(name, path) VALUES ('viedejesus.jpg', 'viedejesus.jpg');
INSERT INTO static_files(name, path) VALUES ('hommesansqualités.jpg', 'hommesansqualités.jpg');
INSERT INTO static_files(name, path) VALUES ('lamaisonverte.jpg', 'lamaisonverte.jpg');
INSERT INTO static_files(name, path) VALUES ('lecoupdepistolet.jpg', 'lecoupdepistolet.jpg');
INSERT INTO static_files(name, path) VALUES ('desangfroid.jpg', 'desangfroid.jpg');
INSERT INTO static_files(name, path) VALUES ('lapositiondutireurcouché.jpg', 'lapositiondutireurcouché.jpg');
INSERT INTO static_files(name, path) VALUES ('verslephare.jpg', 'verslephare.jpg');
INSERT INTO static_files(name, path) VALUES ('insoutenablelégèretédeletre.jpg', 'insoutenablelégèretédeletre.jpg');
INSERT INTO static_files(name, path) VALUES ('lecomplotcontrelamerique.jpg', 'lecomplotcontrelamerique.jpg');
INSERT INTO static_files(name, path) VALUES ('Nord.jpg', 'Nord.jpg');
INSERT INTO static_files(name, path) VALUES ('sa+majesté+des+mouches.jpg', 'sa+majesté+des+mouches.jpg');
INSERT INTO static_files(name, path) VALUES ('Le_Pavillon_d_or.jpg', 'Le_Pavillon_d_or.jpg');
INSERT INTO static_files(name, path) VALUES ('lemeurtredotsuya.jpg', 'lemeurtredotsuya.jpg');
INSERT INTO static_files(name, path) VALUES ('dojoji.jpg', 'dojoji.jpg');
INSERT INTO static_files(name, path) VALUES ('noisy.jpg', 'noisy.jpg');
INSERT INTO static_files(name, path) VALUES ('iliade.jpeg', 'iliade.jpeg');

-- books
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'O dingos, o chateaux!','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'odingosochateaux.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'O dingos, o chateaux!'), true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le petit bleu de la côte Ouest','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'le-petit-bleu-de-la-cote-ouest.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le petit bleu de la côte Ouest'), true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'D''un château l''autre','Louis-Ferdinand Céline', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'dunchateaulautre.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'D''un château l''autre'), true,10);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Les dieux ont soif','Anatole France', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lesdieuxontsoif.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Les dieux ont soif'), true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Rigodon','Louis-Ferdinand Céline', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'rigodon.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Rigodon'),true, 10);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Un barrage contre le Pacifique','Marguerite Duras', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Un_barrage_contre_le_Pacifique.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Un barrage contre le Pacifique'), true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Salammbô','Flaubert Gustave', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'salammbo.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Salammbô'), true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Langage Machine','Romain Lucazeau', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Langage Machine.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Langage Machine'), true,5);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'La Ville et les chiens','Mario Vargas Llosa', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lavilleetleschiens.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'La Ville et les chiens'),true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'La Fille Du Capitaine','A. Pouchkine', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'la-fille-du-capitaine.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'La Fille Du Capitaine'),true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Aurélien','Louis Aragon', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Aurélien.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Aurélien'), true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Duo','Colette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'duo.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Duo'),true,9);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Gargantua','François Rabelais', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'gargantua.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Gargantua'),true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'The Life of Jesus','Ernest Renan', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'viedejesus.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'The Life of Jesus'), false, NULL);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'L''Homme sans qualités, tome 1','Robert Musil', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'hommesansqualités.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'L''Homme sans qualités, tome 1'), true,7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'The Green House','Mario Vargas Llosa', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lamaisonverte.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'The Green House'), true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le coup de pistolet','Alexandre Pouchkine', (SELECT id FROM users WHERE name = 'demo2'),(SELECT id FROM static_files WHERE name = 'lecoupdepistolet.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le coup de pistolet'),true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'De sang-froid','Truman Capote', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'desangfroid.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo2'),(SELECT id FROM books WHERE title = 'De sang-froid'),true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'La position du tireur couché','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lapositiondutireurcouché.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'La position du tireur couché'),true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Vers le Phare','Virginia Woolf', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'verslephare.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Vers le Phare'),true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'L''insoutenable légèreté de l''être', 'Milan Kundera', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'insoutenablelégèretédeletre.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo2'),(SELECT id FROM books WHERE title = 'L''insoutenable légèreté de l''être'), true,8);
INSERT INTO books(created_at, title, author, summary, added_by_id, cover_id) VALUES ('NOW', 'Le complot contre l''Amérique','Philip Roth', 'Lorsque le célèbre aviateur Charles Lindbergh battit le président Roosevelt aux élections présidentielles de 1940, la peur s''empara des Juifs américains. Non seulement Lindbergh avait, dans son discours radiophonique à la nation, reproché aux Juifs de pousser l''Amérique à entreprendre une guerre inutile avec l''Allemagne nazie, mais, en devenant trente-troisième président des États-Unis, il s''empressa de signer un pacte de non-agression avec Hitler. Alors la terreur pénétra dans les foyers juifs, notamment dans celui de la famille Roth. Ce contexte sert de décor historique au Complot contre l''Amérique, un roman où Philip Roth, qui avait sept ans à l''époque, raconte ce que vécut et ressentit sa famille - et des millions de familles semblables dans tout le pays - lors des lourdes années où s''exerça la présidence de Lindbergh, quand les citoyens américains qui étaient aussi des Juifs avaient de bonnes raisons de craindre le pire. Ce faisant, il nous offre un nouveau chef-d''oeuvre.', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lecomplotcontrelamerique.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le complot contre l''Amérique'),true,6);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Nord','Louis-Ferdinand Céline', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Nord.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Nord'),true, 10);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Sa majesté des mouches','William Golding', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'sa+majesté+des+mouches.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Sa majesté des mouches'),true, 5);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le Pavillon d''or','Yukio Mishima', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Le_Pavillon_d_or.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le Pavillon d''or'),true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le meurtre d''O-tsuya','Junichiro Tanizaki', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lemeurtredotsuya.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le meurtre d''O-tsuya'),true, 7);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Dojoji et autres nouvelles','Yukio Mishima', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'dojoji.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Dojoji et autres nouvelles'),true,8);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out','Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepf', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'noisy.jpg'));
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out'),true,2);
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Iliade','Homère', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'iliade.jpeg'));
