using GB5Shared.DTO.Framework.Login; using SwDAL.DTO.ClientDatabase; using SwDAL.DTO.DbServer; namespace SwBLL.Provisioning; /// /// Creates the physical database a MSWCLIENTDATABASE row points at — the capability /// ProvisioningBLL/ChangeRequestBLL never had (both only deploy DDL onto an already-existing /// database). Also creates the three contained-user credentials (dba/app/readonly) every client /// database gets, and asserts a fixed set of DB-level defaults (recovery model, PAGE_VERIFY, /// autogrowth, containment). SQL Server only in this release — see ClientDatabaseProvisioner's /// class doc comment. /// public interface IClientDatabaseProvisioner { /// Restores databaseName from a template backup (templateBackupRef is a filename /// under SqlServerProvisioningOptions.BackupSourcePath — never a full/relative path). /// Logical data/log file names are discovered from the backup itself via /// RESTORE FILELISTONLY, so callers never need to know them up front. Task CreateFromSnapshotAsync( ClientDatabaseDTO clientDb, DbServerDTO server, string templateBackupRef, LoginDTO login, CancellationToken ct); /// Creates an empty database, then hands off to the existing, unmodified /// ProvisioningBLL.ProvisionClientDatabase to deploy baselineUpgradePackageId's Approved DDL /// scripts — no new DDL-execution logic, just reusing what already works. Task CreateFromScriptsAsync( ClientDatabaseDTO clientDb, DbServerDTO server, int baselineUpgradePackageId, LoginDTO login, CancellationToken ct); }