import.sql 3.94 KB
-- INSERT avec identifiants car GenerationType.AUTO a du être changé en GenerationType.IDENTITY (2016-11-21)
//INSERT INTO ActionType (actionTypeId, actionTypeName) VALUES (1, 'Validate');
INSERT INTO Country (countryId, countryName) VALUES
    (1, 'France'),
    (2, 'Suisse'),
    (3, 'Belgique'),
    (4, 'Canada'),
    (5, 'États-Unis d''Amérique'),
    (6, 'Australie'),
    (7, 'Espagne'),
    (8, 'Portugal'),
    (9, 'Royaume-Uni'),
    (10, 'Allemagne'),
    (11, 'Pologne'),
    (12, 'Italie');
INSERT INTO Person (userId, username, password, firstName, lastName, nickname, email, activated, anonymous, visible,
                       criticProvider) VALUES
    (1, 'one', 'one', 'Derrick', 'Moss', 'one', 'one@raza.org', TRUE, FALSE, TRUE, TRUE),
    (2, 'two', 'two', 'Portia', 'Lin', 'two', 'two@raza.org', TRUE, FALSE, TRUE, TRUE),
    (3, 'three', 'three', 'Marcus', 'Boone', 'three', 'three@raza.org', TRUE, FALSE, TRUE, TRUE),
    (4, 'four', 'four', 'Ryo', 'Tetsuda', 'four', 'four@raza.org', TRUE, FALSE, TRUE, TRUE),
    (5, 'five', 'five', 'Emily', 'Kolburn', 'five', 'five@raza.org', TRUE, FALSE, TRUE, TRUE),
    (6, 'six', 'six', 'Kal', 'Varrik', 'six', 'six@raza.org', TRUE, FALSE, TRUE, TRUE);

INSERT INTO Publisher (publisherId) VALUES (1), (2), (3), (4);

INSERT INTO PublisherVersion (publisherVersionId, publisher_publisherId, publisherName, publisherStreetAddress,
                              publisherPostalCode, publisherPostOfficeBoxNumber, publisherAddressRegion,
                              publisherAddressLocality, publisherAddressCountry_countryId, publisherTelephone,
                              publisherEmail, publisherURL, publisherActive, publisherHistory,
                              publisherVersionAuthor_userId, publisherVersionDatetime) VALUES
    (1, 1, 'GRôG', '', '', '', '', '', 1, '', 'passerelle@legrog.org', 'www.legrog.org', TRUE, 'Ouvert…', 1, {ts '2000-05-08 00:00:47'}),
    (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'}),
    (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'}),
    (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'}),
    (5, 4, 'Archmagus', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 'archimage.net', TRUE, 'Ouvert…', 4, {ts '2016-10-14 10:56:03'});
UPDATE Publisher SET validatedVersion_publisherVersionId = 1 WHERE publisherId = 1;
UPDATE Publisher SET validatedVersion_publisherVersionId = 2 WHERE publisherId = 2;
UPDATE Publisher SET validatedVersion_publisherVersionId = 4 WHERE publisherId = 3;

INSERT INTO PublisherAction (publisherActionId, actionType, publisherActionAuthor_userId,
                             publisherVersion_publisherVersionId, publisherActionDatetime, publisher_publisherId) VALUES
    (1, 0, 2, 1, {ts '2000-05-08 12:00:28'}, 1),
    (2, 0, 1, 2, {ts '2010-06-20 14:27:35'}, 2),
    (3, 0, 1, 4, {ts '2015-01-01 16:18:17'}, 3);

INSERT INTO UserRole (userRoleId, rolename, visible) VALUES
    (1, 'VISITEUR', TRUE),
    (2,'RECRUE', TRUE),
    (3, 'CONTRIBUTEUR', TRUE),
    (4, 'ADMINISTRATEUR', TRUE),
    (5, 'RETRAITE', TRUE),
    (6, 'ASSOCE', TRUE);
INSERT INTO UserProperty (userPropertyId, name, tag, visible) VALUES
    (1, 'nb_vignettes', 'Nombre de vignettes en home', TRUE),
    (2, 'avatar', 'Lien vers une icône ou une photo', TRUE),
    (3, 'tagline', 'Ligne de présentation pour les contributeurs', TRUE),
    (4, 'taille_listes', 'Nombre d''éléments affichés dans les listes', TRUE),
    (5,'skin', 'Thème visuel', TRUE);

INSERT INTO Person_UserRole VALUES (1,2);
INSERT INTO Person_UserRole VALUES (2,2);
INSERT INTO Person_UserRole VALUES (3,2);
INSERT INTO Person_UserRole VALUES (4,2);
INSERT INTO Person_UserRole VALUES (5,2);
INSERT INTO Person_UserRole VALUES (6,2);
INSERT INTO Person_UserRole VALUES (5,4);