Jean-Francois Leveque

Passage de la population des données au mode GenerationType.IDENTITY

1 -INSERT INTO UserAction (userActionName) VALUES ('Validate'); 1 +-- INSERT avec identifiants car GenerationType.AUTO a du être changé en GenerationType.IDENTITY (2016-11-21)
2 -INSERT INTO Country (countryName) VALUES ('France'); 2 +INSERT INTO UserAction (userActionId, userActionName) VALUES (1, 'Validate');
3 -INSERT INTO Country (countryName) VALUES ('Suisse'); 3 +INSERT INTO Country (countryId, countryName) VALUES
4 -INSERT INTO Country (countryName) VALUES ('Belgique'); 4 + (1, 'France'),
5 -INSERT INTO Country (countryName) VALUES ('Canada'); 5 + (2, 'Suisse'),
6 -INSERT INTO Country (countryName) VALUES ('États-Unis d''Amérique'); 6 + (3, 'Belgique'),
7 -INSERT INTO Country (countryName) VALUES ('Australie'); 7 + (4, 'Canada'),
8 -INSERT INTO Country (countryName) VALUES ('Espagne'); 8 + (5, 'États-Unis d''Amérique'),
9 -INSERT INTO Country (countryName) VALUES ('Portugal'); 9 + (6, 'Australie'),
10 -INSERT INTO Country (countryName) VALUES ('Royaume-Uni'); 10 + (7, 'Espagne'),
11 -INSERT INTO Country (countryName) VALUES ('Allemagne'); 11 + (8, 'Portugal'),
12 -INSERT INTO Country (countryName) VALUES ('Pologne'); 12 + (9, 'Royaume-Uni'),
13 -INSERT INTO Country (countryName) VALUES ('Italie'); 13 + (10, 'Allemagne'),
14 -INSERT INTO UserTable (USER_ID, username, password, firstName, lastName, nickname, email, activated, anonymous, visible, criticProvider) VALUES 14 + (11, 'Pologne'),
15 + (12, 'Italie');
16 +INSERT INTO UserTable (userId, username, password, firstName, lastName, nickname, email, activated, anonymous, visible,
17 + criticProvider) VALUES
15 (1, 'one', 'one', 'Derrick', 'Moss', 'one', 'one@raza.org', TRUE, FALSE, TRUE, TRUE), 18 (1, 'one', 'one', 'Derrick', 'Moss', 'one', 'one@raza.org', TRUE, FALSE, TRUE, TRUE),
16 (2, 'two', 'two', 'Portia', 'Lin', 'two', 'two@raza.org', TRUE, FALSE, TRUE, TRUE), 19 (2, 'two', 'two', 'Portia', 'Lin', 'two', 'two@raza.org', TRUE, FALSE, TRUE, TRUE),
17 (3, 'three', 'three', 'Marcus', 'Boone', 'three', 'three@raza.org', TRUE, FALSE, TRUE, TRUE), 20 (3, 'three', 'three', 'Marcus', 'Boone', 'three', 'three@raza.org', TRUE, FALSE, TRUE, TRUE),
...@@ -19,35 +22,41 @@ INSERT INTO UserTable (USER_ID, username, password, firstName, lastName, nicknam ...@@ -19,35 +22,41 @@ INSERT INTO UserTable (USER_ID, username, password, firstName, lastName, nicknam
19 (5, 'five', 'five', 'Emily', 'Kolburn', 'five', 'five@raza.org', TRUE, FALSE, TRUE, TRUE), 22 (5, 'five', 'five', 'Emily', 'Kolburn', 'five', 'five@raza.org', TRUE, FALSE, TRUE, TRUE),
20 (6, 'six', 'six', 'Kal', 'Varrik', 'six', 'six@raza.org', TRUE, FALSE, TRUE, TRUE); 23 (6, 'six', 'six', 'Kal', 'Varrik', 'six', 'six@raza.org', TRUE, FALSE, TRUE, TRUE);
21 24
22 -INSERT INTO Publisher VALUES (); 25 +INSERT INTO Publisher (publisherId) VALUES (1), (2), (3), (4);
23 -INSERT INTO Publisher VALUES ();
24 -INSERT INTO Publisher VALUES ();
25 -INSERT INTO Publisher VALUES ();
26 26
27 -INSERT INTO PublisherVersion (publisher_PUBLISHER_ID, publisherName, publisherStreetAddress, publisherPostalCode, 27 +INSERT INTO PublisherVersion (publisherVersionId, publisher_publisherId, publisherName, publisherStreetAddress,
28 - publisherPostOfficeBoxNumber, publisherAddressRegion, publisherAddressLocality, publisherAddressCountry_COUNTRY_ID, 28 + publisherPostalCode, publisherPostOfficeBoxNumber, publisherAddressRegion,
29 - publisherTelephone, publisherEmail, publisherURL, publisherActive, publisherHistory, publisherVersionAuthor_USER_ID, 29 + publisherAddressLocality, publisherAddressCountry_countryId, publisherTelephone,
30 - publisherVersionDatetime) VALUES 30 + publisherEmail, publisherURL, publisherActive, publisherHistory,
31 - (1, 'GRôG', '', '', '', '', '', 1, '', 'passerelle@legrog.org', 'www.legrog.org', TRUE, 'Ouvert…', 1, {ts '2000-05-08 00:00:47'}), 31 + publisherVersionAuthor_userId, publisherVersionDatetime) VALUES
32 - (2, 'Rôliste TV', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'www.rolistetv.com', TRUE, 'Ouvert…', 3, {ts '2010-05-20 08:43:16'}), 32 + (1, 1, 'GRôG', '', '', '', '', '', 1, '', 'passerelle@legrog.org', 'www.legrog.org', TRUE, 'Ouvert…', 1, {ts '2000-05-08 00:00:47'}),
33 - (3, 'La Vouivre', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'la-vouivre.com', TRUE, 'Ouvert…', 1, {ts '2000-01-01 00:02:33'}), 33 + (2, 2, 'Rôliste TV', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'www.rolistetv.com', TRUE, 'Ouvert…', 3, {ts '2010-05-20 08:43:16'}),
34 - (3, 'La Vouivre', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'la-vouivre.com', FALSE, '… en 2015', 2, {ts '2015-01-01 00:05:22'}), 34 + (3, 3, 'La Vouivre', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'la-vouivre.com', TRUE, 'Ouvert…', 1, {ts '2000-01-01 00:02:33'}),
35 - (4, 'Archmagus', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'archimage.net', TRUE, 'Ouvert…', 4, {ts '2016-10-14 10:56:03'}); 35 + (4, 3, 'La Vouivre', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'la-vouivre.com', FALSE, '… en 2015', 2, {ts '2015-01-01 00:05:22'}),
36 -UPDATE Publisher SET validatedVersion_PUBLISHER_VERSION_ID = 1, validator_USER_ID = 2, validationDateTime = {ts '2000-05-08 12:00:28'} WHERE PUBLISHER_ID = 1; 36 + (5, 4, 'Archmagus', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'archimage.net', TRUE, 'Ouvert…', 4, {ts '2016-10-14 10:56:03'});
37 -UPDATE Publisher SET validatedVersion_PUBLISHER_VERSION_ID = 2, validator_USER_ID = 1, validationDateTime = {ts '2010-06-20 14:27:35'} WHERE PUBLISHER_ID = 2; 37 +UPDATE Publisher SET validatedVersion_publisherVersionId = 1 WHERE publisherId = 1;
38 -UPDATE Publisher SET validatedVersion_PUBLISHER_VERSION_ID = 4, validator_USER_ID = 1, validationDateTime = {ts '2015-01-01 16:18:17'} WHERE PUBLISHER_ID = 3; 38 +UPDATE Publisher SET validatedVersion_publisherVersionId = 2 WHERE publisherId = 2;
39 +UPDATE Publisher SET validatedVersion_publisherVersionId = 4 WHERE publisherId = 3;
39 40
40 -INSERT INTO UserRole (rolename, visible) VALUES ('VISITEUR', TRUE); 41 +INSERT INTO PublisherAction (publisherActionId, userAction_userActionId, publisherActionAuthor_userId,
41 -INSERT INTO UserRole (rolename, visible) VALUES ('RECRUE', TRUE); 42 + publisherVersion_publisherVersionId, publisherActionDatetime, publisher_publisherId) VALUES
42 -INSERT INTO UserRole (rolename, visible) VALUES ('CONTRIBUTEUR', TRUE); 43 + (1, 1, 2, 1, {ts '2000-05-08 12:00:28'}, 1),
43 -INSERT INTO UserRole (rolename, visible) VALUES ('ADMINISTRATEUR', TRUE); 44 + (2, 1, 1, 2, {ts '2010-06-20 14:27:35'}, 2),
44 -INSERT INTO UserRole (rolename, visible) VALUES ('RETRAITE', TRUE); 45 + (3, 1, 1, 4, {ts '2015-01-01 16:18:17'}, 3);
45 -INSERT INTO UserRole (rolename, visible) VALUES ('ASSOCE', TRUE); 46 +
46 -INSERT INTO UserProperty (name, tag, visible) VALUES ('nb_vignettes', 'Nombre de vignettes en home', TRUE); 47 +INSERT INTO UserRole (userRoleId, rolename, visible) VALUES
47 -INSERT INTO UserProperty (name, tag, visible) VALUES ('avatar', 'Lien vers une icône ou une photo', TRUE); 48 + (1, 'VISITEUR', TRUE),
48 -INSERT INTO UserProperty (name, tag, visible) VALUES ('tagline', 'Ligne de présentation pour les contributeurs', TRUE); 49 + (2,'RECRUE', TRUE),
49 -INSERT INTO UserProperty (name, tag, visible) VALUES ('taille_listes', 'Nombre d''éléments affichés dans les listes', TRUE); 50 + (3, 'CONTRIBUTEUR', TRUE),
50 -INSERT INTO UserProperty (name, tag, visible) VALUES ('skin', 'Thème visuel', TRUE); 51 + (4, 'ADMINISTRATEUR', TRUE),
52 + (5, 'RETRAITE', TRUE),
53 + (6, 'ASSOCE', TRUE);
54 +INSERT INTO UserProperty (userPropertyId, name, tag, visible) VALUES
55 + (1, 'nb_vignettes', 'Nombre de vignettes en home', TRUE),
56 + (2, 'avatar', 'Lien vers une icône ou une photo', TRUE),
57 + (3, 'tagline', 'Ligne de présentation pour les contributeurs', TRUE),
58 + (4, 'taille_listes', 'Nombre d''éléments affichés dans les listes', TRUE),
59 + (5,'skin', 'Thème visuel', TRUE);
51 60
52 INSERT INTO UserTable_UserRole VALUES (1,2); 61 INSERT INTO UserTable_UserRole VALUES (1,2);
53 INSERT INTO UserTable_UserRole VALUES (2,2); 62 INSERT INTO UserTable_UserRole VALUES (2,2);
......