diff --git a/src/main/java/com/provedcode/handlers/TalentExceptionHandler.java b/src/main/java/com/provedcode/handlers/TalentExceptionHandler.java index 7da4cc8..cc31cbf 100644 --- a/src/main/java/com/provedcode/handlers/TalentExceptionHandler.java +++ b/src/main/java/com/provedcode/handlers/TalentExceptionHandler.java @@ -1,5 +1,6 @@ package com.provedcode.handlers; +import com.provedcode.handlers.dto.ErrorDTO; import jakarta.validation.ConstraintViolationException; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; @@ -65,7 +66,7 @@ private ResponseEntity responseStatusExceptionHandler(ResponseStatusException @ResponseStatus(HttpStatus.BAD_REQUEST) private ResponseEntity responseStatusExceptionHandler(ConstraintViolationException exception) { ApiError apiError = new ApiError(HttpStatus.BAD_REQUEST, exception.getMessage(), exception.toString()); - return new ResponseEntity<>(apiError, new HttpHeaders(), apiError.getStatus()); + return new ResponseEntity<>(new ErrorDTO(apiError.getMessage()), new HttpHeaders(), apiError.getStatus()); } // @ExceptionHandler({ Exception.class }) diff --git a/src/main/java/com/provedcode/talent/controller/TalentController.java b/src/main/java/com/provedcode/talent/controller/TalentController.java index ff09687..ecff1f5 100644 --- a/src/main/java/com/provedcode/talent/controller/TalentController.java +++ b/src/main/java/com/provedcode/talent/controller/TalentController.java @@ -83,4 +83,11 @@ void deleteSkillFromTalent(@PathVariable("talent-id") long talentId, talentService.deleteSkillFromTalent(talentId, skillId, authentication); } + @GetMapping("v4/talents") + Page getFilteredBySkillsTalents(@RequestParam(value = "page", defaultValue = "0") @PositiveOrZero Integer page, + @RequestParam(value = "size", defaultValue = "5") @Min(1) @Max(1000) Integer size, + @RequestParam(value = "filter-by", required = false) String... filterBy) { + return talentService.getFilteredBySkillsTalentsPage(page, size, filterBy).map(talentMapper::talentToShortTalentDTO); + } + } \ No newline at end of file diff --git a/src/main/java/com/provedcode/talent/controller/TalentProofController.java b/src/main/java/com/provedcode/talent/controller/TalentProofController.java index 25492f0..ff89e09 100644 --- a/src/main/java/com/provedcode/talent/controller/TalentProofController.java +++ b/src/main/java/com/provedcode/talent/controller/TalentProofController.java @@ -88,9 +88,9 @@ ProofDTO editProof(Authentication authentication, @DeleteProofApiDoc @DeleteMapping("/{talent-id}/proofs/{proof-id}") @PreAuthorize("hasRole('TALENT')") - StatusDTO deleteProof(@PathVariable(value = "talent-id") long talentId, + void deleteProof(@PathVariable(value = "talent-id") long talentId, @PathVariable(value = "proof-id") long proofId, Authentication authentication) { - return talentProofService.deleteProofById(talentId, proofId, authentication); + talentProofService.deleteProofById(talentId, proofId, authentication); } } \ No newline at end of file diff --git a/src/main/java/com/provedcode/talent/repo/TalentRepository.java b/src/main/java/com/provedcode/talent/repo/TalentRepository.java index b2bac22..e253032 100644 --- a/src/main/java/com/provedcode/talent/repo/TalentRepository.java +++ b/src/main/java/com/provedcode/talent/repo/TalentRepository.java @@ -1,7 +1,23 @@ package com.provedcode.talent.repo; import com.provedcode.talent.model.entity.Talent; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; + +import java.util.List; public interface TalentRepository extends JpaRepository { +// @Query("select t from Talent t left join t.skills skills where upper(skills.skill) like upper(concat('%', ?2, '%'))") +// Page findBySkills_SkillContainsIgnoreCase(Pageable pageable, String... skill); +// @Query("SELECT t FROM Talent t LEFT JOIN t.skills skills WHERE UPPER(skills.skill) LIKE UPPER(CONCAT('%', :skills, '%'))") // if by-symbol contains +// Page findBySkills_SkillContainsIgnoreCase(Pageable pageable, @Param("skills") String... skills); + @Query("SELECT t FROM Talent t INNER JOIN t.skills s WHERE UPPER(s.skill) IN (:filter_by)") //if only contains all + Page findBySkills_SkillsInIgnoreCase(Pageable pageable, @Param("filter_by") List skills); +// @Query("select t from Talent t inner join t.skills skills where upper(skills.skill) like upper(?1)") +// Page findBySkillsLikeIgnoreCase(String skill, Pageable pageable); + } \ No newline at end of file diff --git a/src/main/java/com/provedcode/talent/service/TalentProofService.java b/src/main/java/com/provedcode/talent/service/TalentProofService.java index 9c92069..06b5463 100644 --- a/src/main/java/com/provedcode/talent/service/TalentProofService.java +++ b/src/main/java/com/provedcode/talent/service/TalentProofService.java @@ -5,6 +5,7 @@ import com.provedcode.talent.model.dto.FullProofDTO; import com.provedcode.talent.model.dto.ProofDTO; import com.provedcode.talent.model.dto.StatusDTO; +import com.provedcode.talent.model.entity.Skills; import com.provedcode.talent.model.entity.Talent; import com.provedcode.talent.model.entity.TalentProof; import com.provedcode.talent.model.request.AddProof; @@ -30,8 +31,8 @@ import java.net.URI; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.Objects; -import java.util.Optional; +import java.util.*; +import java.util.stream.Collectors; import static org.springframework.http.HttpStatus.FORBIDDEN; import static org.springframework.http.HttpStatus.NOT_FOUND; @@ -159,14 +160,22 @@ public TalentProof editTalentProof(long talentId, long proofId, ProofDTO proof, return talentProofRepository.save(oldProof); } - public StatusDTO deleteProofById(long talentId, long proofId, Authentication authentication) { + public void deleteProofById(long talentId, long proofId, Authentication authentication) { Optional talent = talentRepository.findById(talentId); Optional talentProof = talentProofRepository.findById(proofId); Optional userInfo = userInfoRepository.findByLogin(authentication.getName()); validateTalentForCompliance.userAndProofVerification(talent, talentProof, userInfo, talentId, proofId); - talent.get().getTalentProofs().remove(talentProof.get()); - return new StatusDTO("deleted"); + Talent updatableTalent = talent.get(); + List talentSkills = updatableTalent.getTalentProofs().stream() + .flatMap(proof -> proof.getSkills().stream()).collect(Collectors.toCollection(ArrayList::new)); + log.info("talent-skills = {}", talentSkills.stream().map(i -> i.getSkill()).toList()); + List skillsOnProof = talentProof.get().getSkills().stream().toList(); + talentSkills.removeAll(skillsOnProof); + Set newTalentSkills = new HashSet<>(talentSkills); + updatableTalent.setSkills(newTalentSkills); + log.info("new talent-skills = {}", newTalentSkills.stream().map(Skills::getSkill).toList()); + updatableTalent.getTalentProofs().remove(talentProof.get()); } } \ No newline at end of file diff --git a/src/main/java/com/provedcode/talent/service/TalentService.java b/src/main/java/com/provedcode/talent/service/TalentService.java index 0cdb04c..2abcb7d 100644 --- a/src/main/java/com/provedcode/talent/service/TalentService.java +++ b/src/main/java/com/provedcode/talent/service/TalentService.java @@ -12,6 +12,9 @@ import com.provedcode.user.model.entity.UserInfo; import com.provedcode.user.repo.AuthorityRepository; import com.provedcode.user.repo.UserInfoRepository; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.PositiveOrZero; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; @@ -21,7 +24,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.server.ResponseStatusException; -import java.util.HashSet; +import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.Set; @@ -194,4 +197,13 @@ public void deleteSkillFromTalent(long talentId, long skillId, Authentication au "Skill with id = %d not found".formatted(skillId)); } } + + @Transactional(readOnly = true) + public Page getFilteredBySkillsTalentsPage(@PositiveOrZero Integer page, + @Min(1) @Max(1000) Integer size, + String... filterBy) { + return filterBy != null ? + talentRepository.findBySkills_SkillsInIgnoreCase(PageRequest.of(page, size), Arrays.stream(filterBy).map(String::toUpperCase).toList()) + : talentRepository.findAll(PageRequest.of(page, size)); + } } \ No newline at end of file diff --git a/src/main/java/com/provedcode/util/annotations/doc/controller/proof/DeleteProofApiDoc.java b/src/main/java/com/provedcode/util/annotations/doc/controller/proof/DeleteProofApiDoc.java index 5f77466..f2e8868 100644 --- a/src/main/java/com/provedcode/util/annotations/doc/controller/proof/DeleteProofApiDoc.java +++ b/src/main/java/com/provedcode/util/annotations/doc/controller/proof/DeleteProofApiDoc.java @@ -19,9 +19,7 @@ description = "As a talent I want to have an opportunity to delete my personal proofs") @ApiResponses(value = { @ApiResponse(responseCode = "200", - description = "SUCCESS", - content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = StatusDTO.class))), + description = "SUCCESS"), @ApiResponse(responseCode = "404", description = "NOT FOUND", content = @Content), diff --git a/src/main/resources/db/changelog/changeset/V4/data-V4.1.sql b/src/main/resources/db/changelog/changeset/V4/data-V4.1.sql index b7e84e2..2f86411 100644 --- a/src/main/resources/db/changelog/changeset/V4/data-V4.1.sql +++ b/src/main/resources/db/changelog/changeset/V4/data-V4.1.sql @@ -15,8 +15,4 @@ INSERT INTO proof_skill (proof_id, skill_id) VALUES (5, 2); INSERT INTO proof_skill (proof_id, skill_id) VALUES (6, 3); --- Skill in talent -INSERT INTO talent_skill (talent_id, skill_id) -VALUES(1, 1); -INSERT INTO talent_skill (talent_id, skill_id) -VALUES(1, 2); \ No newline at end of file + diff --git a/src/main/resources/db/changelog/changeset/V4/data-V4.2.sql b/src/main/resources/db/changelog/changeset/V4/data-V4.2.sql new file mode 100644 index 0000000..09cd767 --- /dev/null +++ b/src/main/resources/db/changelog/changeset/V4/data-V4.2.sql @@ -0,0 +1,25 @@ +--liquibase formatted sql +--changeset mykhailo:3 + +-- Skill on proof + + +-- Skill on talent +INSERT INTO talent_skill (talent_id, skill_id) +VALUES(1, 1); +INSERT INTO talent_skill (talent_id, skill_id) +VALUES(1, 2); +INSERT INTO talent_skill (talent_id, skill_id) +VALUES(5, 1); +INSERT INTO talent_skill (talent_id, skill_id) +VALUES(5, 2); +INSERT INTO talent_skill (talent_id, skill_id) +VALUES(5, 3); + +-- Skills on proof +INSERT INTO proof_skill (proof_id, skill_id) +VALUES (13, 1); +INSERT INTO proof_skill (proof_id, skill_id) +VALUES (13, 2); +INSERT INTO proof_skill (proof_id, skill_id) +VALUES (13, 3); diff --git a/src/main/resources/db/changelog/changeset/V4/data-V4.sql b/src/main/resources/db/changelog/changeset/V4/data-V4.sql index 4f08749..c1b0ebb 100644 --- a/src/main/resources/db/changelog/changeset/V4/data-V4.sql +++ b/src/main/resources/db/changelog/changeset/V4/data-V4.sql @@ -35,2036 +35,1619 @@ values (13, 'Angular'); -- Talent -- Serhii Soloviov insert into talent (first_name, last_name, specialization, image) -values ( - 'Serhii', +values ('Serhii', 'Soloviov', 'Java-Developer', - 'https://i.pinimg.com/564x/e1/08/49/e10849923a8b2e85a7adf494ebd063e6.jpg' - ); + 'https://i.pinimg.com/564x/e1/08/49/e10849923a8b2e85a7adf494ebd063e6.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', 'My cat`s name is Igor' - ); + ), + 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', + 'My cat`s name is Igor'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'first_contact' - ); + ), 'first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'second_contact' - ); + ), 'second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'third_contact' - ); + ), 'third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here I wrote a program that transforms the written code into music', 'PUBLISHED', '2022-01-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', + 'Here I wrote a program that transforms the written code into music', 'PUBLISHED', '2022-01-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-03-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-03-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2021-06-08 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2021-06-08 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'SerhiiSoloviov@gmail.com', '$2a$10$EzYxG1DEUek/veK.HzP7B.ynSKE42VbLb4pvFd/v4OwGPNol6buEC' - ); + ), 'SerhiiSoloviov@gmail.com', '$2a$10$EzYxG1DEUek/veK.HzP7B.ynSKE42VbLb4pvFd/v4OwGPNol6buEC'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Mykhailo Ordyntsev insert into talent (first_name, last_name, specialization, image) -values ( - 'Mykhailo', +values ('Mykhailo', 'Ordyntsev', 'Java-Developer', - 'https://i.pinimg.com/564x/c2/41/31/c24131fe00218467721ba5bacdf0a256.jpg' - ); + 'https://i.pinimg.com/564x/c2/41/31/c24131fe00218467721ba5bacdf0a256.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', 'I very like anime' - ); + ), + 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', + 'I very like anime'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MykhailoOrdyntsev_first_contact' - ); + ), 'MykhailoOrdyntsev_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MykhailoOrdyntsev_second_contact' - ); + ), 'MykhailoOrdyntsev_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MykhailoOrdyntsev_third_contact' - ); + ), 'MykhailoOrdyntsev_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'DRAFT', '2022-08-07 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'DRAFT', '2022-08-07 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'HIDDEN', '2022-04-08 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'HIDDEN', '2022-04-08 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2022-09-02 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2022-09-02 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MykhailoOrdyntsev@gmail.com', '$2a$10$XD60M86n1MDf3AMIixgnnOQq9JVYnnX/umlNFcre0GoC2XgSN/Cfq' - ); + ), 'MykhailoOrdyntsev@gmail.com', '$2a$10$XD60M86n1MDf3AMIixgnnOQq9JVYnnX/umlNFcre0GoC2XgSN/Cfq'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Denis Boyko insert into talent (first_name, last_name, specialization, image) -values ( - 'Denis', +values ('Denis', 'Boyko', 'Java-Developer', - 'https://i.pinimg.com/564x/2a/0c/08/2a0c08c421e253ca895c3fdc8c9e08d9.jpg' - ); + 'https://i.pinimg.com/564x/2a/0c/08/2a0c08c421e253ca895c3fdc8c9e08d9.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', 'I`m a student ' - ); + ), + 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', + 'I`m a student '); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DenisBoyko_first_contact' - ); + ), 'DenisBoyko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DenisBoyko_second_contact' - ); + ), 'DenisBoyko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DenisBoyko_third_contact' - ); + ), 'DenisBoyko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'DRAFT', '2022-02-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'DRAFT', '2022-02-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2021-09-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2021-09-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-04-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-04-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DenisBoyko@gmail.com', '$2a$10$tLm27FGH8Sabz57eNkTwm.bSnhmJHINcqt7dNfZI0NfOwD2o/Drse' - ); + ), 'DenisBoyko@gmail.com', '$2a$10$tLm27FGH8Sabz57eNkTwm.bSnhmJHINcqt7dNfZI0NfOwD2o/Drse'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Ihor Schurenko insert into talent (first_name, last_name, specialization, image) -values ( - 'Ihor', +values ('Ihor', 'Schurenko', 'Java-Developer', - 'https://i.pinimg.com/564x/e1/11/2f/e1112f0b7b63644dc3e313084936dedb.jpg' - ); + 'https://i.pinimg.com/564x/e1/11/2f/e1112f0b7b63644dc3e313084936dedb.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', 'I will get married soon' - ); + ), + 'Hello! I was born in Ukraine. My profession is Java Back-end developer. Now I`m developing a Java backend using Spring Boot.', + 'I will get married soon'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorShchurenko_first_contact' - ); + ), 'IhorShchurenko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorShchurenko_second_contact' - ); + ), 'IhorShchurenko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorShchurenko_third_contact' - ); + ), 'IhorShchurenko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here I describe my rest api project in java', 'PUBLISHED', '2021-08-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here I describe my rest api project in java', + 'PUBLISHED', '2021-08-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2022-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2022-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-05-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-05-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorShchurenko@gmail.com', '$2a$10$X.d4hR.yRf3cK0Go20aTTukOI9u/Zu2cj5WU0iTcDihyhJ5vUHXkq' - ); + ), 'IhorShchurenko@gmail.com', '$2a$10$X.d4hR.yRf3cK0Go20aTTukOI9u/Zu2cj5WU0iTcDihyhJ5vUHXkq'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Dmytro Uzun insert into talent (first_name, last_name, specialization, image) -values ( - 'Dmytro', +values ('Dmytro', 'Uzun', 'Dev-Ops', - 'https://i.pinimg.com/564x/1c/af/87/1caf8771ef3edf351f6f2bf6f1c0a276.jpg' - ); + 'https://i.pinimg.com/564x/1c/af/87/1caf8771ef3edf351f6f2bf6f1c0a276.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'I am instructing a team that is currently writing my own biography for me.', 'He-he-he, hello everyone!' - ); + ), 'I am instructing a team that is currently writing my own biography for me.', + 'He-he-he, hello everyone!'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DmytroUzun_first_contact' - ); + ), 'DmytroUzun_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DmytroUzun_second_contact' - ); + ), 'DmytroUzun_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DmytroUzun_third_contact' - ); + ), 'DmytroUzun_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://github.com/ProvedCode', 'My project where I am a team mentor', 'PUBLISHED', '2023-02-08 16:00:19' - ); + ), 'https://github.com/ProvedCode', 'My project where I am a team mentor', 'PUBLISHED', + '2023-02-08 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2021-03-03 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2021-03-03 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-09-05 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-09-05 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DmytroUzun@gmail.com', '$2a$10$J2Yuh10BWHy8XYk.T5rd2uOwk/h5EYG1eVXTAOkTkTdQcc5Qzd9.y' - ); + ), 'DmytroUzun@gmail.com', '$2a$10$J2Yuh10BWHy8XYk.T5rd2uOwk/h5EYG1eVXTAOkTkTdQcc5Qzd9.y'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Viktor Voloshko insert into talent (first_name, last_name, specialization, image) -values ( - 'Viktor', +values ('Viktor', 'Voloshko', 'Dev-Ops', - 'https://i.pinimg.com/564x/a9/51/ab/a951ab682413b89617235e65564c1e5e.jpg' - ); + 'https://i.pinimg.com/564x/a9/51/ab/a951ab682413b89617235e65564c1e5e.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is dev-ops.', 'I like videogames!' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is dev-ops.', 'I like videogames!'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ViktorVoloshko_first_contact' - ); + ), 'ViktorVoloshko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ViktorVoloshko_second_contact' - ); + ), 'ViktorVoloshko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ViktorVoloshko_third_contact' - ); + ), 'ViktorVoloshko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'HIDDEN', '2022-02-09 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'HIDDEN', '2022-02-09 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2020-04-02 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2020-04-02 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-08-06 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-08-06 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ViktorVoloshko@gmail.com', '$2a$10$eZX3hBvllxkmH.juZzN72uvFYtphkrxsj14K5BnHHKy4coRV9FMvq' - ); + ), 'ViktorVoloshko@gmail.com', '$2a$10$eZX3hBvllxkmH.juZzN72uvFYtphkrxsj14K5BnHHKy4coRV9FMvq'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Olha Moiseienko insert into talent (first_name, last_name, specialization, image) -values ( - 'Olha', +values ('Olha', 'Moiseienko', 'QA', - 'https://i.pinimg.com/564x/6d/9d/43/6d9d437baf4db114c047d927307beb84.jpg' - ); + 'https://i.pinimg.com/564x/6d/9d/43/6d9d437baf4db114c047d927307beb84.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'OlhaMoiseienko_first_contact' - ); + ), 'OlhaMoiseienko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'OlhaMoiseienko_second_contact' - ); + ), 'OlhaMoiseienko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'OlhaMoiseienko_third_contact' - ); + ), 'OlhaMoiseienko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'HIDDEN', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to first proof', 'HIDDEN', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My QA Jira project', 'PUBLISHED', '2022-09-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My QA Jira project', 'PUBLISHED', '2022-09-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2021-01-09 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2021-01-09 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'OlhaMoiseienko@gmail.com', '$2a$10$lvvX7DZOwCS/Q7zSo.k.oeayTcKHh8rO1yBBkgIbU4VAC7abPfIa2' - ); + ), 'OlhaMoiseienko@gmail.com', '$2a$10$lvvX7DZOwCS/Q7zSo.k.oeayTcKHh8rO1yBBkgIbU4VAC7abPfIa2'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Maxim Kiyashko insert into talent (first_name, last_name, specialization, image) -values ( - 'Maxim', +values ('Maxim', 'Kiyashko', 'QA', - 'https://i.pinimg.com/564x/80/2d/58/802d58b0302985f9486893d499d3634d.jpg' - ); + 'https://i.pinimg.com/564x/80/2d/58/802d58b0302985f9486893d499d3634d.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MaximKiyashko_first_contact' - ); + ), 'MaximKiyashko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MaximKiyashko_second_contact' - ); + ), 'MaximKiyashko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MaximKiyashko_third_contact' - ); + ), 'MaximKiyashko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My custom Arduino OS', 'PUBLISHED', '2023-08-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My custom Arduino OS', 'PUBLISHED', + '2023-08-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-01-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-01-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'PUBLISHED', '2023-02-09 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'PUBLISHED', + '2023-02-09 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'MaximKiyashko@gmail.com', '$2a$10$y.g9qHYUOPEkIL8xDc2h1.EdVAG5DYh6OKxf9CRb6s16oHHbr8Bny' - ); + ), 'MaximKiyashko@gmail.com', '$2a$10$y.g9qHYUOPEkIL8xDc2h1.EdVAG5DYh6OKxf9CRb6s16oHHbr8Bny'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Nikolaiev Oleksii insert into talent (first_name, last_name, specialization, image) -values ( - 'Nikolaiev', +values ('Nikolaiev', 'Oleksii', 'QA', - 'https://i.pinimg.com/564x/54/d1/0d/54d10dfce64afefabc9fbbce5de82c87.jpg' - ); + 'https://i.pinimg.com/564x/54/d1/0d/54d10dfce64afefabc9fbbce5de82c87.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'NikolaievOleksii_first_contact' - ); + ), 'NikolaievOleksii_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'NikolaievOleksii_second_contact' - ); + ), 'NikolaievOleksii_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'NikolaievOleksii_third_contact' - ); + ), 'NikolaievOleksii_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Link to my magnum opus:', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Link to my magnum opus:', 'PUBLISHED', + '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2023-06-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'NikolaievOleksiio@gmail.com', '$2a$10$nDObO3nDlhWev29qCnzNuOszdg/.ANaMlTirDVWVyLMapYmtSSqza' - ); + ), 'NikolaievOleksiio@gmail.com', '$2a$10$nDObO3nDlhWev29qCnzNuOszdg/.ANaMlTirDVWVyLMapYmtSSqza'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Artem Lytvynenko insert into talent (first_name, last_name, specialization, image) -values ( - 'Artem', +values ('Artem', 'Lytvynenko', 'QA', - 'https://i.pinimg.com/564x/87/63/55/87635509c5fa7ee496ec351fa7e67eaa.jpg' - ); + 'https://i.pinimg.com/564x/87/63/55/87635509c5fa7ee496ec351fa7e67eaa.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is QA.', 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ArtemLytvynenko_first_contact' - ); + ), 'ArtemLytvynenko_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ArtemLytvynenko_second_contact' - ); + ), 'ArtemLytvynenko_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ArtemLytvynenko_third_contact' - ); + ), 'ArtemLytvynenko_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here I wrote tasks for the project', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here I wrote tasks for the project', 'PUBLISHED', + '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'HIDDEN', '2023-06-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'ArtemLytvynenko@gmail.com', '$2a$10$.M2fHh9NXbkbnrVHeT.lYeInA8K2khuMUL08iG4NuXs18KIeFBmwG' - ); + ), 'ArtemLytvynenko@gmail.com', '$2a$10$.M2fHh9NXbkbnrVHeT.lYeInA8K2khuMUL08iG4NuXs18KIeFBmwG'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Daniil Yevtukhov insert into talent (first_name, last_name, specialization, image) -values ( - 'Daniil', +values ('Daniil', 'Yevtukhov', 'Java-Script-Developer', - 'https://i.pinimg.com/564x/fe/b1/37/feb137d88a3d1c8fb28796db6cbc576f.jpg' - ); + 'https://i.pinimg.com/564x/fe/b1/37/feb137d88a3d1c8fb28796db6cbc576f.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', 'I have my own Instagram' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', + 'I have my own Instagram'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DaniilYevtukhov_first_contact' - ); + ), 'DaniilYevtukhov_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DaniilYevtukhov_second_contact' - ); + ), 'DaniilYevtukhov_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DaniilYevtukhov_third_contact' - ); + ), 'DaniilYevtukhov_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My main project where I am making REACT application', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'My main project where I am making REACT application', + 'PUBLISHED', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'HIDDEN', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'HIDDEN', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'DaniilYevtukhov@gmail.com', '$2a$10$cDxp6U/YcObKMwZNgtEB5eZFLWXuwFU0lIUSPIkfPdvq9l8JUqGea' - ); + ), 'DaniilYevtukhov@gmail.com', '$2a$10$cDxp6U/YcObKMwZNgtEB5eZFLWXuwFU0lIUSPIkfPdvq9l8JUqGea'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Ruslan Morozov insert into talent (first_name, last_name, specialization, image) -values ( - 'Ruslan', +values ('Ruslan', 'Morozov', 'Java-Script-Developer', - 'https://i.pinimg.com/736x/36/ae/0e/36ae0ea4aad656f7c3d3175bc33b8399.jpg' - ); + 'https://i.pinimg.com/736x/36/ae/0e/36ae0ea4aad656f7c3d3175bc33b8399.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', + 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'RuslanMorozov_first_contact' - ); + ), 'RuslanMorozov_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'RuslanMorozov_second_contact' - ); + ), 'RuslanMorozov_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'RuslanMorozov_third_contact' - ); + ), 'RuslanMorozov_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here my container for styles', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here my container for styles', 'PUBLISHED', + '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to second proof', 'DRAFT', '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'RuslanMorozov@gmail.com', '$2a$10$Hfzp4b6r825g1ZqGzxmal..VNKvo7F4v4YFpBZZ036hmO.7UIWlaK' - ); + ), 'RuslanMorozov@gmail.com', '$2a$10$Hfzp4b6r825g1ZqGzxmal..VNKvo7F4v4YFpBZZ036hmO.7UIWlaK'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Ihor Kopieichykov insert into talent (first_name, last_name, specialization, image) -values ( - 'Ihor', +values ('Ihor', 'Kopieichykov', 'Java-Script-Developer', - 'https://i.pinimg.com/564x/0d/f0/83/0df083121bac75f64e3d93c7c5682d04.jpg' - ); + 'https://i.pinimg.com/564x/0d/f0/83/0df083121bac75f64e3d93c7c5682d04.jpg'); insert into talent_description (talent_id, BIO, addition_info) -values( - ( +values (( select id from talent order by id desc limit 1 - ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', 'Glory to Ukraine' - ); + ), 'Hi all! I was born in Ukraine. I am a student. My profession is JavaScript developer.', + 'Glory to Ukraine'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_link (talent_id, link) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorKopieichykov_first_contact' - ); + ), 'IhorKopieichykov_first_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorKopieichykov_second_contact' - ); + ), 'IhorKopieichykov_second_contact'); insert into talent_contact (talent_id, contact) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorKopieichykov_third_contact' - ); + ), 'IhorKopieichykov_third_contact'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_attached_file (talent_id, attached_file) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here is my JavaScript library', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here is my JavaScript library', 'PUBLISHED', + '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here is my main project in Angular', 'PUBLISHED', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Here is my main project in Angular', 'PUBLISHED', + '2023-06-04 16:00:19'); insert into talent_proofs (talent_id, link, text, status, created) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19' - ); + ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'text to third proof', 'DRAFT', '2023-06-04 16:00:19'); insert into user_info (talent_id, login, password) -values ( - ( +values (( select id from talent order by id desc limit 1 - ), 'IhorKopieichykov@gmail.com', '$2a$10$D4KM50WemOahkFv1fkrPX.MvVESsE0TYWlkh5TypTE/q4nlv8ooyS' - ); + ), 'IhorKopieichykov@gmail.com', '$2a$10$D4KM50WemOahkFv1fkrPX.MvVESsE0TYWlkh5TypTE/q4nlv8ooyS'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 1 - ) - ); + )); -- Sponsor -- Maksym Khudoliy insert into sponsor (amount_kudos, first_name, last_name, image) -values ( - 888, +values (888, 'Maksym', 'Khudoliy', - 'https://i.pinimg.com/564x/e1/08/49/e10849923a8b2e85a7adf494ebd063e6.jpg' - ); + 'https://i.pinimg.com/564x/e1/08/49/e10849923a8b2e85a7adf494ebd063e6.jpg'); insert into user_info (sponsor_id, login, password) -values ( - ( +values (( select id from sponsor order by id desc limit 1 - ), 'MaksymKhudoliy@gmail.com', '$2a$10$pDrAuawhi3ADZpVDDr7C6eAcaQwDr5oQ9GdZUUZHSsqyM/vVkpruy' - ); + ), 'MaksymKhudoliy@gmail.com', '$2a$10$pDrAuawhi3ADZpVDDr7C6eAcaQwDr5oQ9GdZUUZHSsqyM/vVkpruy'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 2 - ) - ); + )); -- Oleksandr Butrym insert into sponsor (amount_kudos, first_name, last_name, image) -values ( - 888, +values (888, 'Oleksandr', 'Butrym', - 'https://i.pinimg.com/564x/c2/41/31/c24131fe00218467721ba5bacdf0a256.jpg' - ); + 'https://i.pinimg.com/564x/c2/41/31/c24131fe00218467721ba5bacdf0a256.jpg'); insert into user_info (sponsor_id, login, password) -values ( - ( +values (( select id from sponsor order by id desc limit 1 - ), 'OleksandrButrym@gmail.com', '$2a$10$R0o8os0t86qyBvg0bO/a6ukuy9VesLapxIkZFLjNupWjvr5Hdjyge' - ); + ), 'OleksandrButrym@gmail.com', '$2a$10$R0o8os0t86qyBvg0bO/a6ukuy9VesLapxIkZFLjNupWjvr5Hdjyge'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 2 - ) - ); + )); -- Olha Shutylieva insert into sponsor (amount_kudos, first_name, last_name, image) -values ( - 888, +values (888, 'Olha', 'Shutylieva', - 'https://i.pinimg.com/564x/2a/0c/08/2a0c08c421e253ca895c3fdc8c9e08d9.jpg' - ); + 'https://i.pinimg.com/564x/2a/0c/08/2a0c08c421e253ca895c3fdc8c9e08d9.jpg'); insert into user_info (sponsor_id, login, password) -values ( - ( +values (( select id from sponsor order by id desc limit 1 - ), 'OlhaShutylieva@gmail.com', '$2a$10$UzwVTVR7E2BW.5hA4XWgy.g0XcM.UbIMBoY1cDnYNPQDhCXEa7eGm' - ); + ), 'OlhaShutylieva@gmail.com', '$2a$10$UzwVTVR7E2BW.5hA4XWgy.g0XcM.UbIMBoY1cDnYNPQDhCXEa7eGm'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 2 - ) - ); + )); -- Vladyslav Khrychov insert into sponsor (amount_kudos, first_name, last_name, image) -values ( - 888, +values (888, 'Vladyslav', 'Khrychov', - 'https://i.pinimg.com/564x/e1/11/2f/e1112f0b7b63644dc3e313084936dedb.jpg' - ); + 'https://i.pinimg.com/564x/e1/11/2f/e1112f0b7b63644dc3e313084936dedb.jpg'); insert into user_info (sponsor_id, login, password) -values ( - ( +values (( select id from sponsor order by id desc limit 1 - ), 'VladyslavKhrychov@gmail.com', '$2a$10$o2va23ZPVVSptyCaSBO/oubpML4xEPZo9Ie0ASt154zNVSKdFrN02' - ); + ), 'VladyslavKhrychov@gmail.com', '$2a$10$o2va23ZPVVSptyCaSBO/oubpML4xEPZo9Ie0ASt154zNVSKdFrN02'); insert into user_authorities (user_id, authority_id) -values ( - ( +values (( select id from user_info order by id desc limit 1 - ), ( + ), ( select authority.id from authority where id = 2 - ) - ); + )); -- Kudos insert into kudos (amount, sponsor_id, proof_id) values (100, 1, 1); diff --git a/src/main/resources/db/changelog/changeset/V4/schema-V4.sql b/src/main/resources/db/changelog/changeset/V4/schema-V4.sql index 9355c9b..7608822 100644 --- a/src/main/resources/db/changelog/changeset/V4/schema-V4.sql +++ b/src/main/resources/db/changelog/changeset/V4/schema-V4.sql @@ -2,128 +2,142 @@ -- changeset Ren:0 -- tables for sprint 4.1 -- Talent -CREATE TABLE talent ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - first_name VARCHAR(20), - last_name VARCHAR(20), +CREATE TABLE talent +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + first_name VARCHAR(20), + last_name VARCHAR(20), specialization VARCHAR(30), - image VARCHAR(1000), - image_name VARCHAR(100), + image VARCHAR(1000), + image_name VARCHAR(100), CONSTRAINT pk_talent PRIMARY KEY (id) ); -CREATE TABLE talent_attached_file ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT NOT NULL, +CREATE TABLE talent_attached_file +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT NOT NULL, attached_file VARCHAR(100), CONSTRAINT pk_talent_attached_file PRIMARY KEY (id) ); -CREATE TABLE talent_contact ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT NOT NULL, - contact VARCHAR(255), +CREATE TABLE talent_contact +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT NOT NULL, + contact VARCHAR(255), CONSTRAINT pk_talent_contact PRIMARY KEY (id) ); -CREATE TABLE talent_description ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT NOT NULL, - bio VARCHAR(2000), +CREATE TABLE talent_description +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT NOT NULL, + bio VARCHAR(2000), addition_info VARCHAR(500), CONSTRAINT pk_talent_description PRIMARY KEY (id) ); -CREATE TABLE talent_link ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT NOT NULL, - link VARCHAR(500), +CREATE TABLE talent_link +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT NOT NULL, + link VARCHAR(500), CONSTRAINT pk_talent_link PRIMARY KEY (id) ); -CREATE TABLE talent_proofs ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT NOT NULL, - link VARCHAR(100), - text VARCHAR(1000), - status VARCHAR(20) NOT NULL, - created TIMESTAMP, +CREATE TABLE talent_proofs +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT NOT NULL, + link VARCHAR(100), + text VARCHAR(1000), + status VARCHAR(20) NOT NULL, + created TIMESTAMP, CONSTRAINT pk_talent_proofs PRIMARY KEY (id) ); -CREATE TABLE talent_skill ( +CREATE TABLE talent_skill +( talent_id BIGINT NOT NULL, - skill_id BIGINT NOT NULL, + skill_id BIGINT NOT NULL, CONSTRAINT pk_talent_skill PRIMARY KEY (talent_id, skill_id) ); -CREATE TABLE proof_skill ( +CREATE TABLE proof_skill +( proof_id BIGINT NOT NULL, skill_id BIGINT NOT NULL, CONSTRAINT pk_proof_skill PRIMARY KEY (proof_id, skill_id) ); -CREATE TABLE skill ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, +CREATE TABLE skill +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, skill VARCHAR(30), CONSTRAINT pk_skill PRIMARY KEY (id) ); -- User -CREATE TABLE user_info ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - talent_id BIGINT, +CREATE TABLE user_info +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + talent_id BIGINT, sponsor_id BIGINT, - login VARCHAR(100) NOT NULL, - password VARCHAR(255) NOT NULL, + login VARCHAR(100) NOT NULL, + password VARCHAR(255) NOT NULL, CONSTRAINT pk_user_info PRIMARY KEY (id) ); -CREATE TABLE authority ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - authority VARCHAR(20) NOT NULL, +CREATE TABLE authority +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + authority VARCHAR(20) NOT NULL, CONSTRAINT pk_authority PRIMARY KEY (id) ); -CREATE TABLE user_authorities ( +CREATE TABLE user_authorities +( authority_id BIGINT NOT NULL, - user_id BIGINT NOT NULL, + user_id BIGINT NOT NULL, CONSTRAINT pk_user_authorities PRIMARY KEY (authority_id, user_id) ); -- Sponsor -CREATE TABLE sponsor ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, - first_name VARCHAR(20), - last_name VARCHAR(20), - image VARCHAR(1000), - image_name VARCHAR(100), +CREATE TABLE sponsor +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, + first_name VARCHAR(20), + last_name VARCHAR(20), + image VARCHAR(1000), + image_name VARCHAR(100), amount_kudos BIGINT, CONSTRAINT pk_sponsor PRIMARY KEY (id) ); -CREATE TABLE kudos ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, +CREATE TABLE kudos +( + id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, sponsor_id BIGINT, - proof_id BIGINT, - amount BIGINT, + proof_id BIGINT, + amount BIGINT, CONSTRAINT pk_kudos PRIMARY KEY (id) ); -- Foreign keys ALTER TABLE talent_attached_file -ADD CONSTRAINT FK_TALENT_ATTACHED_FILE_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_TALENT_ATTACHED_FILE_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE talent_contact -ADD CONSTRAINT FK_TALENT_CONTACT_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_TALENT_CONTACT_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE talent_description -ADD CONSTRAINT FK_TALENT_DESCRIPTION_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_TALENT_DESCRIPTION_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE talent_link -ADD CONSTRAINT FK_TALENT_LINK_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_TALENT_LINK_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE talent_proofs -ADD CONSTRAINT FK_TALENT_PROOFS_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_TALENT_PROOFS_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE user_info -ADD CONSTRAINT FK_USER_INFO_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_USER_INFO_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE user_authorities -ADD CONSTRAINT FK_useaut_on_authority FOREIGN KEY (authority_id) REFERENCES authority (id); + ADD CONSTRAINT FK_useaut_on_authority FOREIGN KEY (authority_id) REFERENCES authority (id); ALTER TABLE user_authorities -ADD CONSTRAINT FK_useaut_on_user_info FOREIGN KEY (user_id) REFERENCES user_info (id); + ADD CONSTRAINT FK_useaut_on_user_info FOREIGN KEY (user_id) REFERENCES user_info (id); ALTER TABLE kudos -ADD CONSTRAINT FK_KUDOS_ON_PROOF FOREIGN KEY (proof_id) REFERENCES talent_proofs (id); + ADD CONSTRAINT FK_KUDOS_ON_PROOF FOREIGN KEY (proof_id) REFERENCES talent_proofs (id); ALTER TABLE kudos -ADD CONSTRAINT FK_KUDOS_ON_SPONSOR FOREIGN KEY (sponsor_id) REFERENCES sponsor (id); + ADD CONSTRAINT FK_KUDOS_ON_SPONSOR FOREIGN KEY (sponsor_id) REFERENCES sponsor (id); ALTER TABLE proof_skill -ADD CONSTRAINT FK_proof_skill_ON_TALENT_PROOF FOREIGN KEY (proof_id) REFERENCES talent_proofs (id); + ADD CONSTRAINT FK_proof_skill_ON_TALENT_PROOF FOREIGN KEY (proof_id) REFERENCES talent_proofs (id); ALTER TABLE proof_skill -ADD CONSTRAINT FK_proof_skill_ON_SKILL FOREIGN KEY (skill_id) REFERENCES skill (id); + ADD CONSTRAINT FK_proof_skill_ON_SKILL FOREIGN KEY (skill_id) REFERENCES skill (id); ALTER TABLE talent_skill -ADD CONSTRAINT FK_talent_skill_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); + ADD CONSTRAINT FK_talent_skill_ON_TALENT FOREIGN KEY (talent_id) REFERENCES talent (id); ALTER TABLE talent_skill -ADD CONSTRAINT FK_talent_skill_ON_SKILL FOREIGN KEY (skill_id) REFERENCES skill (id); + ADD CONSTRAINT FK_talent_skill_ON_SKILL FOREIGN KEY (skill_id) REFERENCES skill (id); -- Indexes CREATE UNIQUE INDEX idx_login ON user_info (login) \ No newline at end of file diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 102ca3c..e5dec38 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -11,3 +11,5 @@ databaseChangeLog: file: db/changelog/changeset/V4/data-V4.sql - include: file: db/changelog/changeset/V4/data-V4.1.sql + - include: + file: db/changelog/changeset/V4/data-V4.2.sql