-
Notifications
You must be signed in to change notification settings - Fork 7
Option to migrate SQL Server tables to PostgreSQL #6867
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 23, 2025
…tables that TableSorter removed.
This was referenced Jul 27, 2025
Merged
labkey-jeckels
approved these changes
Jul 31, 2025
core/resources/schemas/dbscripts/postgresql/core-0.000-24.000.sql
Outdated
Show resolved
Hide resolved
experiment/src/org/labkey/experiment/api/property/StorageProvisionerImpl.java
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale
We want to provide administrators the ability to easily migrate a SQL Server LabKey SDMS deployment to PostgreSQL. Changes in this PR provide an option to create empty PostgreSQL schemas and migrate all module & provisioned table data into them from a SQL Server deployment.
Specification: https://docs.google.com/document/d/1oY3Mhnusa17OsC3NDj3WR5gS5YlynUP5zzc2tBht_D4/edit?tab=t.0#heading=h.4rg4h5vuek0
This is a significant step forward, but it's still a work in progress. What's missing:
There should be no functional changes in the normal case. The new code is invoked only when the server is started with specific command-line arguments.
Changes
If a PostgreSQL database is being bootstrapped and a specific argument is added to the command line, the server will:
exp.DomainDescriptor
*Some details:
migrationDataSource
argument is used to specify the SQL Server data source to migrate. For example:-DmigrationDataSource=ssDataSource
-DemptySchemas=true
can be used to test the empty schema creation and verification without attempting an actual migrationMigrationHandler
implementations to customize behavior (e.g., accommodate cyclical FKs or adjust the tables to migrate)Tasks 📍
Deleted
columns fromprot
schema