Migration Utility
March 31st, 2022: Ed-Fi Alliance announced EOL for ODS Migration utility. While the utility could be used for upgrade to Ed-Fi ODS / API v5.3 version for both SQL Server and PostgreSQL, there will be no new migration support or enhancements to this product.
Overview
The ODS Migration Utility is a command-line tool built to upgrade the schema of an ODS instance up to the latest version, along with data migration.
It currently supports data migration from Ed-Fi Data Standard v2.0 and Ed-Fi Data Standard v2.2 to Ed-Fi Data Standard v3.3. The utility has out-of-the-box support for migrating an as-shipped ODS to the latest version. With additional customized scripting, the Migration Utility can be easily adapted and used to migrate extended ODS instances. ODS shared instances may take advantage of this utility. For year-specific instances, migration may not be a concern as a new ODS is created at the beginning of every school year.
Contents:
Usage Scenarios
The following table summarizes the supported scenarios for the migration utility:
Database Type | Databases | Upgrade/Migration strategy |
|---|---|---|
Core Databases | EdFi_Ods, EdFi_Ods_YYYY, EdFi_Ods_Sandbox | The current migration utility release supports an in-place upgrade for the following upgrade paths for SQL Server: 2.4 -> 5.3 and following upgrade path for PostgreSQL: 3.4 -> 5.3
The migration utility also supports migrating extensions with additional custom scripts. |
Support Databases | EdFi_Admin, EdFi_Security, EdFi_Bulk | These databases can either be recreated, or database deployment tool can be used to migrate them. |
Transient Databases | EdFi_ODS_Empty, EdFi_Ods_Minimal_Template EdFi_Ods_Populated_Template | No upgrade supported. |
Developer Quick Start
The basic steps are simple:
Restore a backup copy of the target ODS to your local SQL Server instance. We recommend:
Start with the basic suite 2 ODS: Sample ODS Download: EdFi.Samples.Ods/2.0.0.21. This is a small sample ODS, ideal for initial development and testing.
Move on to the larger suite 2 ODS: Glendale 2.0 ODS Backup (created 2018-06-13). This is a much larger ODS containing sample data, useful for validation and QA.
Make sure .NET Core 3.1 SDK is installed.
Choose one of the two options below to launch the migration utility:
Downloads
Ed-Fi ODS Migration Utility binaries: EdFi.Suite3.Ods.Utilities.Migration v2.2 (Prerequisite: .NET Core 3.1 SDK)
Ed-Fi ODS Migration Utility source code, hosted on Ed-Fi Alliance GitHub: https://github.com/Ed-Fi-Exchange-OSS/Ed-Fi-MigrationUtility
Example calendar configuration files: Sample Calendar Config
Development Overview: The Basics
The table below describes files and folders used by the Migration Utility along with a description and purpose for each resource.
Overview Item | Needed by Whom? | Brief Description & Purpose |
|---|---|---|
Script Directory: |
|
|
Directory: |
|
|
Library/Console: (console application created via dotnet publish) |
|
|
Test Project: |
|
|
Development Troubleshooting
This section outlines general troubleshooting procedures.
Compatibility Errors
Before the schema is updated, the ODS data is checked for compatibility. If changes are required, the upgrade will stop and exception will be thrown with instructions on how to proceed.
An example error message follows:
After making the required changes (or writing custom scripts), simply launch the upgrade utility again. The upgrade will proceed where it left off and retry with the last script that failed.
Other Exceptions During Development
Similar to compatibility error events, the upgrade will halt and an exception message will be generated during development if a problem is encountered.
After making updates to the script that failed, simply re-launch the update tool. The upgrade will proceed where it left off starting with the last script that failed.
If you are testing a version that is not yet released, or if you need to re-execute scripts that were renamed or modified during active development: restore your database from backup and start over.
Similar to other database migration tools, a log of scripts successfully executed will be stored in the default journal table. DbUp's default location is
[dbo].[SchemaVersions].A log file containing errors/warnings from the most recent run may be found by default in
"{YourInstallFolder}\.store\edfi.suite3.ods.utilities.migration\{YourMigrationUtilityVersion}\edfi.suite3.ods.utilities.migration\{YourMigrationUtilityVersion}\tools\netcoreapp3.1\any\Ed-Fi-Migration.log".
Additional Troubleshooting
The step-by-step usage guide below contains runtime troubleshooting information.