Skip to content

Commit 4cdf5ad

Browse files
authored
feat: add compatibility for dbops v0.9 (#231)
* feat: add compatibility for dbops v0.9 * chore: release details + doc tweak
1 parent 740f4b2 commit 4cdf5ad

File tree

7 files changed

+38
-8
lines changed

7 files changed

+38
-8
lines changed

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ lowlydba.sqlserver Release Notes
55
.. contents:: Topics
66

77

8+
v2.3.1
9+
======
10+
11+
Release Summary
12+
---------------
13+
14+
Update the install script feature to accommodate the latest minor DbOps release (v0.9.x)
15+
16+
Minor Changes
17+
-------------
18+
19+
- Add new input strings to be compatible with dbops v0.9.x (https://github.com/lowlydba/lowlydba.sqlserver/pull/231)
20+
821
v2.3.0
922
======
1023

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lowlydba.sqlserver Collection for Ansible
1+
# lowlydba.sqlserver Collection for Ansible<!-- omit in toc -->
22

33
![GPL v3](https://img.shields.io/github/license/lowlydba/lowlydba.sqlserver)
44
[![CI](https://github.com/lowlydba/lowlydba.sqlserver/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/lowlydba/lowlydba.sqlserver/actions/workflows/ansible-test.yml)
@@ -11,11 +11,17 @@
1111
- [Contributing to this collection](#contributing-to-this-collection)
1212
- [Collection maintenance](#collection-maintenance)
1313
- [Tested with](#tested-with)
14+
- [Ansible](#ansible)
15+
- [SQL Server](#sql-server)
1416
- [External requirements](#external-requirements)
1517
- [Using this collection](#using-this-collection)
1618
- [Installing the Collection from Ansible Galaxy](#installing-the-collection-from-ansible-galaxy)
17-
- [Release notes](#release-notes)
1819
- [Releasing](#releasing)
20+
- [Release notes](#release-notes)
21+
- [Next Release](#next-release)
22+
- [Schedule](#schedule)
23+
- [Versioning](#versioning)
24+
- [Deprecation](#deprecation)
1925

2026
## Modules
2127

@@ -73,7 +79,7 @@ To learn how to maintain / become a maintainer of this collection, refer to the
7379

7480
- PowerShell modules
7581
- [dbatools][dbatools] >= 2.0.0
76-
- [dbops][dbops] >= 0.8.0
82+
- [dbops][dbops] >= 0.9.0
7783

7884
## Using this collection
7985

changelogs/changelog.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,13 @@ releases:
473473
- 2-2-4-release-summary.yml
474474
- 227-skip-pwd-reset.yml
475475
release_date: '2024-02-10'
476+
2.3.1:
477+
changes:
478+
minor_changes:
479+
- Add new input strings to be compatible with dbops v0.9.x (https://github.com/lowlydba/lowlydba.sqlserver/pull/231)
480+
release_summary: Update the install script feature to accommodate the latest
481+
minor DbOps release (v0.9.x)
482+
fragments:
483+
- 2-3-1-release-summary.yml
484+
- 231-dbops-v09.yml
485+
release_date: '2024-02-24'

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace: lowlydba
44
name: sqlserver
5-
version: 2.3.0
5+
version: 2.3.1
66
readme: README.md
77
authors:
88
- John McCall (github.com/lowlydba)

plugins/modules/install_script.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#AnsibleRequires -CSharpUtil Ansible.Basic
88
#AnsibleRequires -PowerShell ansible_collections.lowlydba.sqlserver.plugins.module_utils._SqlServerUtils
99
#Requires -Modules @{ ModuleName="dbatools"; ModuleVersion="2.0.0" }
10-
#Requires -Modules @{ ModuleName="dbops"; ModuleVersion="0.8.0" }
10+
#Requires -Modules @{ ModuleName="dbops"; ModuleVersion="0.9.0" }
1111

1212
$spec = @{
1313
supports_check_mode = $true
1414
options = @{
1515
database = @{type = 'str'; required = $true }
1616
path = @{type = 'str'; required = $true }
1717
deployment_method = @{type = 'str'; required = $false; default = 'NoTransaction'
18-
choices = @('NoTransaction', 'SingleTransaction', 'TransactionPerScript')
18+
choices = @('NoTransaction', 'SingleTransaction', 'TransactionPerScript', 'AlwaysRollback')
1919
}
2020
schema_version_table = @{type = 'str'; required = $false }
2121
no_log_version = @{type = 'bool'; required = $false; default = $false }

plugins/modules/install_script.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
- C(SingleTransaction) - wrap all the deployment scripts into a single transaction and rollback whole deployment on error.
3434
- C(TransactionPerScript) - wrap each script into a separate transaction; rollback single script deployment in case of error.
3535
- C(NoTransaction) - deploy as is.
36+
- C(AlwaysRollback) - roll back the transaction.
3637
type: str
3738
required: false
3839
default: 'NoTransaction'
39-
choices: ['NoTransaction', 'SingleTransaction', 'TransactionPerScript']
40+
choices: ['NoTransaction', 'SingleTransaction', 'TransactionPerScript', 'AlwaysRollback']
4041
no_log_version:
4142
description:
4243
- If set, the deployment will not be tracked in the database. That will also mean that all the scripts

tests/integration/targets/setup_sqlserver/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dbatools_install_cmd: >
66
Set-DbatoolsInsecureConnection -Scope FileUserLocal
77
}
88
9-
dbops_min_version: 0.8.0
9+
dbops_min_version: 0.9.0
1010
dbops_install_cmd: >
1111
if (-not(Get-Module -FullyQualifiedName @{ModuleName='dbops';ModuleVersion='{{ dbops_min_version }}'} -ListAvailable)) {
1212
Install-Module dbops -MinimumVersion {{ dbops_min_version }} -Force -SkipPublisherCheck -AllowClobber

0 commit comments

Comments
 (0)