Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BL-897 created migrate and seed for inboxes-table #4

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

razborovdb
Copy link
Contributor

Description

  1. Added application-dev.properties to .gitignore
  2. Created sprint profile : application-dev.properties
  3. The active profile (application-dev.properties) is set in the application.properties.
  4. For testing purpose we will use Docker PostgreSQL as in current backend project
  5. Created schema.sql that contains SQL queries to migrate tables: roles, profiles, messages, conversations
  6. Created data.sql that contains SQL queries to seed tables: roles, profiles, messages, conversations
  7. Created a new package “entities” in main\java\com.bloomtechlabs.coderheroesbea (to store database tables)
  8. Created a new package “repositories” in main\java\com.bloomtechlabs.coderheroesbea (to access data in the database tables)
  9. The following dependencies have been added to build.gradle:
  • testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
  • testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
  • implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  • implementation 'org.springframework.boot:spring-boot-starter-validation'
  • runtimeOnly 'org.postgresql:postgresql'
  1. Created class Conversations for table conversations
  2. Created class Messages for table messages
  3. Created class Profiles for table profiles
  4. Created class Roles for table roles
  5. Created interface ConversationsRepository to access data in table conversations
  6. Created interface MessagesRepository to access data in table messages
  7. Created interface ProfilesRepository to access data in table profiles
  8. Created interface RolesRepository to access data in table roles
  9. Created a new package “migrationseed” in test\java\ com.bloomtechlabs.coderheroesbea (for test migration and seed)
  10. Created test classes MigrationSeedRolesTest, MigrationSeedMessagesTest, MigrationSeedProfilesTest, MigrationSeedConversationsTest for test migration and seed for tables: roles, profiles, messages, conversations.**

Loom Video

https://www.loom.com/share/5896be465a4a439fa7692fbda06a8dfe

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have removed unnecessary comments/console logs from my code
  • I have made corresponding changes to the documentation if necessary (optional)
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings
  • No duplicate code left within changed files
  • Size of pull request kept to a minimum
  • Pull request description clearly describes changes made & motivations for said changes

Copy link
Contributor

@decagondev decagondev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table migrations are clean and clear in your SQL files. The choice of using pure SQL files inside the spring boot project was a clear winner for a simple implementation of setting up the schema.

@ashtilawat23 ashtilawat23 merged commit 3913a02 into main Nov 7, 2022
@ashtilawat23 ashtilawat23 deleted the BL-897-bd-migrate-and-seed-inboxes-table branch November 7, 2022 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants