Org-FoodService / FoodServiceAPI

FoodService is a .NET 8.0-based service, optimizing snack bar operations through menu management, inventory tracking, and potential delivery integration. With Docker and SQLServer dependencies, it streamlines processes for snack bar owners, enhancing efficiency and customer experience.
https://foodservice-api.azurewebsites.net/swagger
2 stars 1 forks source link

Migration of API Database from MySQL to SQL Server #26

Closed NicolasBuscarini closed 1 month ago

NicolasBuscarini commented 1 month ago

Technical Story: Migrating API Database from MySQL to SQL Server

Title: Migration of API Database from MySQL to SQL Server

Description: In order to align with our infrastructure strategy and take advantage of Azure services, we are migrating the database used by our API from MySQL to SQL Server. This decision is driven by the availability of a free SQL Server database option on Azure and aims to optimize costs while enhancing scalability and integration capabilities.

Acceptance Criteria:

  1. Database Migration:

    • Transfer all existing schema from MySQL to SQL Server using Entity Framework migrations.
    • Ensure seamless migration without data loss or corruption.
  2. API Configuration:

    • Update the API configuration to connect to the new SQL Server database.
    • Verify that the Entity Framework context and database connection strings are correctly updated.
  3. Documentation:

    • Document the migration process, including steps taken and any modifications made to the API configuration.
    • Provide guidelines for troubleshooting.

Tasks:

  1. Database Migration:

    • [x] Create Entity Framework migration scripts to transfer schema from MySQL to SQL Server.
    • [x] Apply the migration scripts to the SQL Server database to ensure schema consistency.
  2. API Configuration:

    • [x] Update API configuration files to point to the new SQL Server database.
    • [x] Verify that Entity Framework context and database connection strings are updated accordingly.
  3. Documentation:

    • [x] Document the migration process, including steps taken and any issues encountered.
    • [x] Update API documentation to reflect changes related to database migration.

Business Value:

Migrating the API database from MySQL to SQL Server with Entity Framework ensures a seamless transition with minimal impact on existing code and queries. By leveraging a free SQL Server database option on Azure, we optimize costs while gaining access to advanced features and support. This migration aligns with our goal of leveraging cloud services for scalability and reliability, ultimately enhancing the overall performance and efficiency of our API infrastructure.