diff --git a/.pipelines/dwsql-pipelines.yml b/.pipelines/dwsql-pipelines.yml index d8fe8d0455..5f967ae815 100644 --- a/.pipelines/dwsql-pipelines.yml +++ b/.pipelines/dwsql-pipelines.yml @@ -2,7 +2,7 @@ # Licensed under the MIT License. # DwSql Integration Testing Pipeline config is split into two jobs: -# 1) LinuxTests -> Run SQL Server 2019 in Linux Docker Image +# 1) LinuxTests -> Run SQL Server 2025 in Linux Docker Image # 2) WindowsTests -> Run LocalDB preinstalled on machine trigger: @@ -159,8 +159,8 @@ jobs: # The variable setting on the pipeline UI sets the connection string # for the linux job above. data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True; - InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi - SqlVersionCode: '15.0' + InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi + SqlVersionCode: '17.0' steps: - task: CmdLine@2 diff --git a/.pipelines/mssql-pipelines.yml b/.pipelines/mssql-pipelines.yml index bdfb5e37e6..69762f7915 100644 --- a/.pipelines/mssql-pipelines.yml +++ b/.pipelines/mssql-pipelines.yml @@ -2,7 +2,7 @@ # Licensed under the MIT License. # MsSql Integration Testing Pipeline config is split into parallel jobs: -# 1) linux (disabled) -> Run SQL Server 2019 in Linux Docker Image +# 1) linux (disabled) -> Run SQL Server 2025 in Linux Docker Image # 2) windows_combined -> GraphQL, REST, Unit, HotReload, OpenApi, Auth, Telemetry, Caching on LocalDB # 3) windows_configuration -> Configuration tests on LocalDB (with schema init) @@ -176,8 +176,8 @@ jobs: # The variable setting on the pipeline UI sets the connection string # for the linux job above. data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True; - InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi - SqlVersionCode: '15.0' + InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi + SqlVersionCode: '17.0' steps: - template: templates/mssql-test-steps.yml @@ -199,8 +199,8 @@ jobs: # The variable setting on the pipeline UI sets the connection string # for the linux job above. data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True; - InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi - SqlVersionCode: '15.0' + InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi + SqlVersionCode: '17.0' steps: - template: templates/mssql-test-steps.yml diff --git a/scripts/start-mssql-server.bash b/scripts/start-mssql-server.bash index 5268a5b807..4b1f0a0a42 100644 --- a/scripts/start-mssql-server.bash +++ b/scripts/start-mssql-server.bash @@ -27,7 +27,7 @@ echo "forceencryption = 1" >> $CERT_DIR/mssql.conf cat $CERT_DIR/mssql.conf # Start mssql-server by volume mounting the cert, key and conf files. -docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$DOCKER_SQL_PASS" -p 1433:1433 --name customerdb -h customerdb -v $CERT_DIR/mssql.conf:/var/opt/mssql/mssql.conf -v $CERT_DIR/mssql.pem:/var/opt/mssql/mssql.pem -v $CERT_DIR/mssql.key:/var/opt/mssql/mssql.key -d mcr.microsoft.com/mssql/server:2019-latest +docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$DOCKER_SQL_PASS" -p 1433:1433 --name customerdb -h customerdb -v $CERT_DIR/mssql.conf:/var/opt/mssql/mssql.conf -v $CERT_DIR/mssql.pem:/var/opt/mssql/mssql.pem -v $CERT_DIR/mssql.key:/var/opt/mssql/mssql.key -d mcr.microsoft.com/mssql/server:2025-latest sleep 30 docker logs customerdb diff --git a/src/Service.Tests/DatabaseSchema-MsSql.sql b/src/Service.Tests/DatabaseSchema-MsSql.sql index 70414e95b0..39c796e3dc 100644 --- a/src/Service.Tests/DatabaseSchema-MsSql.sql +++ b/src/Service.Tests/DatabaseSchema-MsSql.sql @@ -40,6 +40,7 @@ DROP TABLE IF EXISTS stocks; DROP TABLE IF EXISTS comics; DROP TABLE IF EXISTS brokers; DROP TABLE IF EXISTS type_table; +DROP TABLE IF EXISTS vector_type_table; DROP TABLE IF EXISTS trees; DROP TABLE IF EXISTS fungi; DROP TABLE IF EXISTS empty_table; @@ -234,6 +235,12 @@ CREATE TABLE type_table( uuid_types uniqueidentifier DEFAULT newid() ); +CREATE TABLE vector_type_table( + id int IDENTITY(5001, 1) PRIMARY KEY, + vector_data vector(3), + vector_data_max vector(1998) +); + CREATE TABLE trees ( treeId int PRIMARY KEY, species varchar(max), @@ -616,6 +623,23 @@ VALUES INSERT INTO type_table(id, uuid_types) values(10, 'D1D021A8-47B4-4AE4-B718-98E89C41A161'); SET IDENTITY_INSERT type_table OFF +SET IDENTITY_INSERT vector_type_table ON +INSERT INTO vector_type_table(id, vector_data) +VALUES + (1, '[0.5, 0.25, 0.75]'), + (2, '[1.5, -2.5, 3.5]'), + (3, NULL), + (4, '[1.0, 2.0, 3.0]'), + (5, '[4.0, 5.0, 6.0]'), + (6, '[7.0, 8.0, 9.0]'); + +INSERT INTO vector_type_table(id, vector_data_max) +VALUES (7, CAST('[' + ( + SELECT STRING_AGG(CAST(value AS NVARCHAR(MAX)), ',') WITHIN GROUP (ORDER BY value) + FROM GENERATE_SERIES(1, 1998) +) + ']' AS vector(1998))); +SET IDENTITY_INSERT vector_type_table OFF + SET IDENTITY_INSERT sales ON INSERT INTO sales(id, item_name, subtotal, tax) VALUES (1, 'Watch', 249.00, 20.59), (2, 'Montior', 120.50, 11.12); SET IDENTITY_INSERT sales OFF diff --git a/src/Service.Tests/dab-config.MsSql.json b/src/Service.Tests/dab-config.MsSql.json index 6a41d8ee13..873d44eea7 100644 --- a/src/Service.Tests/dab-config.MsSql.json +++ b/src/Service.Tests/dab-config.MsSql.json @@ -4022,4 +4022,4 @@ ] } } -} \ No newline at end of file +}