Skip to content

Commit

Permalink
Support for Babelfish v.5.0.0 (#136)
Browse files Browse the repository at this point in the history
* Adding Support for v.5.0.0

Signed-off-by: Tanya Gupta <tanyagp@amazon.com>

* Updating line ending from LF to CRLF

* Adding Support for v.5.0.0

Signed-off-by: Tanya Gupta <tanyagp@amazon.com>

* updating alter server popup messages

Signed-off-by: Tanya Gupta <tanyagp@amazon.com>

* updating alter server popup messages

Signed-off-by: Tanya Gupta <tanyagp@amazon.com>

---------

Signed-off-by: Tanya Gupta <tanyagp@amazon.com>
Co-authored-by: Tanya Gupta <tanyagp@amazon.com>
  • Loading branch information
tanyagupta17 and Tanya Gupta authored Jan 14, 2025
1 parent a454fc9 commit 3d42a86
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
Binary file modified BabelfishCompass_UserGuide.docx
Binary file not shown.
Binary file modified BabelfishCompass_UserGuide.pdf
Binary file not shown.
8 changes: 5 additions & 3 deletions BabelfishFeatures.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# this must always be the first section:
[Babelfish for T-SQL]
# only Babelfish version numbers listed here can be referenced the rules below:
valid_versions=1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0
valid_versions=1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0, 5.0.0
# x.y.1/2/3 etc are bugfix releases for x.y.0 (no new T-SQL features supported), and are typically based on a newer PG release
file_format=2 # version number for format of this .cfg file. This is not expected to change much
file_timestamp=Dec-2024 # identifies the version of this file, together with the latest Babelfish version supported
file_timestamp=Jan-2025 # identifies the version of this file, together with the latest Babelfish version supported
# format: dd-MON-yyyy or MON-yyyy

# Basic principle:
Expand Down Expand Up @@ -1545,6 +1545,7 @@ report_group=Users
[DB roles]
rule=alter_db_role
list=DB_OWNER,DB_SECURITYADMIN,DB_ACCESSADMIN,DB_BACKUPOPERATOR,DB_DDLADMIN,DB_DATAWRITER,DB_DATAREADER,DB_DENYDATAWRITER,DB_DENYDATAREADER
supported-5.0.0=DB_DATAREADER,DB_DATAWRITER,DB_DDLADMIN,DB_ACCESSADMIN,DB_SECURITYADMIN,DB_OWNER
report_group=Users
complexity_score=HIGH
Expand All @@ -1556,6 +1557,7 @@ report_group=Users
rule=alter_server_role
list=SYSADMIN,SERVERADMIN,SECURITYADMIN,PROCESSADMIN,SETUPADMIN,BULKADMIN,DISKADMIN,DBCREATOR
supported-1.0.0=SYSADMIN
supported-5.0.0=SECURITYADMIN,DBCREATOR
report_group=Users
[Server role options]
Expand Down Expand Up @@ -1667,5 +1669,5 @@ list=FORMSOF,ISABOUT,NEAR,INFLECTIONAL,THESAURUS
complexity_score=HIGH
#-----------------------------------------------------------------------------------
#file checksum=72d4288c
#file checksum=ab6afbca
#--- end ---------------------------------------------------------------------------
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2025-01
- Added support for Babelfish v.5.0.0.
- Detect various server-level and database-level fixed roles.

# 2024-12
- Added support for Babelfish v.4.4.0.
- Detect object type argument to sp_rename.
Expand Down
20 changes: 14 additions & 6 deletions src/main/java/compass/CompassUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class CompassUtilities {
public static boolean onLinux = false;
public static String onPlatform = uninitialized;

public static final String thisProgVersion = "2024-12";
public static final String thisProgVersionDate = "December 2024";
public static final String thisProgVersion = "2025-01";
public static final String thisProgVersionDate = "January 2025";
public static final String thisProgName = "Babelfish Compass";
public static final String thisProgNameLong = "Compatibility assessment tool for Babelfish for PostgreSQL";
public static final String thisProgNameExec = "Compass";
Expand Down Expand Up @@ -112,8 +112,8 @@ public class CompassUtilities {
public String targetBabelfishVersionReportLine = "Target Babelfish version : v."; // line in report listing the target version
public boolean stdReport = false; // development only

public static List<String> BabelfishVersionList = Arrays.asList("1.0.0", "1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "4.0.0", "4.1.0", "4.2.0", "4.3.0", "4.4.0");
public static List<String> BabelfishPGVersionList = Arrays.asList("13.4", "13.5", "13.6", "13.7", "13.8", "13.9", "14.3/4", "14.5", "14.6", "14.7", "15.2", "15.3", "15.4", "15.5", "15.6", "16.1", "16.2", "16.3", "16.4", "16.6");
public static List<String> BabelfishVersionList = Arrays.asList("1.0.0", "1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "4.0.0", "4.1.0", "4.2.0", "4.3.0", "4.4.0", "5.0.0");
public static List<String> BabelfishPGVersionList = Arrays.asList("13.4", "13.5", "13.6", "13.7", "13.8", "13.9", "14.3/4", "14.5", "14.6", "14.7", "15.2", "15.3", "15.4", "15.5", "15.6", "16.1", "16.2", "16.3", "16.4", "16.6", "17.2");

// minimum Babelfish version; this is fixed
public static final String baseBabelfishVersion = "1.0.0";
Expand Down Expand Up @@ -701,8 +701,16 @@ public class CompassUtilities {
"ALTER ROLE db_datawriter"+tttSeparator+"The db_datawriter role is not currently supported; rewrite by granting permissions on all tables/views",
"ALTER ROLE db_denydatawriter"+tttSeparator+"The db_denydatawriter role is not currently supported; rewrite by revoking permissions on all tables/views",
"ALTER ROLE"+tttSeparator+"ALTER ROLE for this DB-level role is not currently supported",
"CREATE SERVER ROLE"+tttSeparator+"Server-level roles are not currently supported, except the predefined 'sysadmin' role",
"ALTER SERVER ROLE"+tttSeparator+"ALTER SERVER ROLE for server-level roles is not currently supported, except the predefined 'sysadmin' role",
"CREATE SERVER ROLE"+tttSeparator+"User defined server-level roles are not currently supported",
"ALTER SERVER ROLE securityadmin"+tttSeparator+"The securityadmin role is not currently supported",
"ALTER SERVER ROLE dbcreator"+tttSeparator+"The dbcreator role is not currently supported",
"ALTER SERVER ROLE processadmin"+tttSeparator+"The processadmin role is not currently supported; rewrite by using T-SQL KILL by a login that has sysadmin role privileges",
"ALTER SERVER ROLE setupadmin"+tttSeparator+"The setupadmin role is not currently supported",
"ALTER SERVER ROLE bulkadmin"+tttSeparator+"The bulkadmin role is not currently supported; rewrite by using the COPY command in PG",
"ALTER SERVER ROLE diskadmin"+tttSeparator+"The diskadmin role is not currently supported",
"ALTER SERVER ROLE serveradmin"+tttSeparator+"The serveradmin role is not currently supported",
"ALTER SERVER ROLE <srvrole>"+tttSeparator+"User defined server-level roles are not currently supported",
"ALTER SERVER ROLE"+tttSeparator+"ALTER SERVER ROLE for this server-level role is not currently supported",
"CREATE USER"+tttSeparator+"DB users are not currently supported, except 'dbo' and 'guest'",
"ALTER USER"+tttSeparator+"DB users are not currently supported, except 'dbo' and 'guest'",
"ALTER VIEW"+tttSeparator+"ALTER VIEW is not currently supported; use DROP+CREATE",
Expand Down

0 comments on commit 3d42a86

Please sign in to comment.