Skip to content

Create Flyway Migration Script to Add Test Jobs #43

@AhmedFatthy1040

Description

@AhmedFatthy1040

Issue Title: Create Flyway Migration Script to Add Test Jobs

Issue Description:

To facilitate testing and development, we need to create a Flyway migration script that populates the database with approximately 50 job postings. This will help in testing the job management features, filtering, and search functionalities.

Tasks:

  1. Create Migration Script:

    • Develop a Flyway migration script (V5__Add_Test_Jobs.sql) that inserts 50 job records into the jobs table.
    • Ensure the script generates realistic job data for testing.
  2. Define Job Data Structure:

    • Each job should include the following attributes:
      • client_id: Randomly assigned (ensure the user exists in the users table).
      • title: A randomly generated job title (e.g., "Software Developer", "Graphic Designer").
      • description: A brief job description (e.g., "Looking for an experienced software developer...").
      • budget: A random budget value within a reasonable range (e.g., between 50.00 and 5000.00).
      • job_type: Randomly set as either 'Hourly' or 'Fixed'.
      • status: Randomly set as either 'Open' or 'In Progress'.
      • created_at: Set to the current timestamp using SQL.
  3. Test the Migration:

    • Run the Flyway migration to ensure it correctly populates the database without errors.
    • Verify that the inserted jobs can be retrieved using the appropriate queries.

Acceptance Criteria:

  • A Flyway migration script is created and can successfully insert 50 job postings into the database.
  • The migration script generates realistic job data based on the defined structure.
  • The inserted jobs can be retrieved and displayed accurately from the database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions