/*
 * DBAOps Sovereign™ — Schema v10: Supreme Polish
 *
 * Closes the final 9 capability gaps to make DBAOps Sovereign™
 * the #1 enterprise database operations platform.
 *
 *  1. Exception Governance
 *  2. Compliance Packs (CJIS/NIST/PCI/HIPAA/SOX)
 *  3. Artifact Integrity
 *  4. Collector Blueprints
 *  5. Brand & Legal Config
 *  6. Truth-First Data Collection State
 *  7. Multi-Tenant Enforcement
 *  8. Product Naming Registry
 *  9. Executive Proof Snapshots
 */

USE SovereignRepository;
GO

-- ===== 1. Exception Governance =====

IF OBJECT_ID('comp.ExceptionGovernance', 'U') IS NULL
BEGIN
  CREATE TABLE comp.ExceptionGovernance (
    ExceptionId     UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    TenantId        UNIQUEIDENTIFIER NULL,
    ServerId        UNIQUEIDENTIFIER NULL,
    PolicyRuleId    UNIQUEIDENTIFIER NULL,
    ControlCode     NVARCHAR(64) NULL,
    ExceptionType   NVARCHAR(32) NOT NULL, -- SecurityWaiver, ComplianceException, BackupException, PatchDeferral, AccessOverride
    Title           NVARCHAR(256) NOT NULL,
    Justification   NVARCHAR(MAX) NOT NULL,
    RiskAccepted    NVARCHAR(32) NOT NULL DEFAULT 'Low', -- Low, Medium, High, Critical
    OwnerId         NVARCHAR(256) NOT NULL,
    OwnerEmail      NVARCHAR(256) NULL,
    ApprovedBy      NVARCHAR(256) NULL,
    ApprovedAt      DATETIME2 NULL,
    EffectiveDate   DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME(),
    ExpiryDate      DATETIME2 NOT NULL,
    ReviewSchedule  NVARCHAR(16) NOT NULL DEFAULT 'Quarterly', -- Monthly, Quarterly, SemiAnnual, Annual
    LastReviewedAt  DATETIME2 NULL,
    LastReviewedBy  NVARCHAR(256) NULL,
    ReviewNotes     NVARCHAR(MAX) NULL,
    Status          NVARCHAR(16) NOT NULL DEFAULT 'Pending', -- Pending, Active, Expired, Revoked, UnderReview
    CreatedAt       DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME()
  );
  CREATE NONCLUSTERED INDEX IX_Exception_Status ON comp.ExceptionGovernance (Status, ExpiryDate);
END;
GO

IF OBJECT_ID('comp.ExceptionReviewHistory', 'U') IS NULL
BEGIN
  CREATE TABLE comp.ExceptionReviewHistory (
    ReviewId        UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    ExceptionId     UNIQUEIDENTIFIER NOT NULL FOREIGN KEY REFERENCES comp.ExceptionGovernance(ExceptionId),
    ReviewedBy      NVARCHAR(256) NOT NULL,
    ReviewedAt      DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME(),
    Decision        NVARCHAR(16) NOT NULL, -- Renewed, Revoked, Escalated, Modified
    Notes           NVARCHAR(MAX) NULL,
    PreviousExpiry  DATETIME2 NULL,
    NewExpiry       DATETIME2 NULL
  );
END;
GO

-- ===== 2. Compliance Packs =====

IF OBJECT_ID('comp.CompliancePack', 'U') IS NULL
BEGIN
  CREATE TABLE comp.CompliancePack (
    PackId          UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    PackCode        NVARCHAR(32) NOT NULL UNIQUE, -- CJIS, NIST-800-53, PCI-DSS-4, HIPAA, SOX, INTERNAL
    PackName        NVARCHAR(256) NOT NULL,
    Standard        NVARCHAR(256) NOT NULL,
    Version         NVARCHAR(32) NULL,
    ControlCount    INT NOT NULL DEFAULT 0,
    Description     NVARCHAR(MAX) NULL,
    IsActive        BIT NOT NULL DEFAULT 1
  );
END;
GO

IF OBJECT_ID('comp.CompliancePackControl', 'U') IS NULL
BEGIN
  CREATE TABLE comp.CompliancePackControl (
    ControlId       UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    PackId          UNIQUEIDENTIFIER NOT NULL FOREIGN KEY REFERENCES comp.CompliancePack(PackId),
    ControlCode     NVARCHAR(64) NOT NULL,
    ControlTitle    NVARCHAR(512) NOT NULL,
    Severity        NVARCHAR(16) NOT NULL DEFAULT 'Medium',
    AutomatedCheck  BIT NOT NULL DEFAULT 1,
    CheckQuery      NVARCHAR(MAX) NULL,
    RemediationGuidance NVARCHAR(MAX) NULL,
    EvidenceTemplate NVARCHAR(MAX) NULL
  );
END;
GO

IF OBJECT_ID('comp.CompliancePackResult', 'U') IS NULL
BEGIN
  CREATE TABLE comp.CompliancePackResult (
    ResultId        BIGINT IDENTITY(1,1) PRIMARY KEY,
    PackId          UNIQUEIDENTIFIER NOT NULL,
    ControlId       UNIQUEIDENTIFIER NOT NULL,
    ServerId        UNIQUEIDENTIFIER NOT NULL,
    AssessedAt      DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME(),
    IsCompliant     BIT NOT NULL,
    CurrentValue    NVARCHAR(MAX) NULL,
    ExpectedValue   NVARCHAR(MAX) NULL,
    Evidence        NVARCHAR(MAX) NOT NULL,
    AssessedBy      NVARCHAR(64) NOT NULL DEFAULT 'SYSTEM'
  );
END;
GO

-- ===== 3. Artifact Integrity =====

IF OBJECT_ID('audit.ArtifactIntegrity', 'U') IS NULL
BEGIN
  CREATE TABLE audit.ArtifactIntegrity (
    ArtifactId      UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    ArtifactType    NVARCHAR(32) NOT NULL, -- PDFReport, CSVExport, EvidencePackage, EmailSummary, CompliancePack
    Title           NVARCHAR(256) NOT NULL,
    GeneratedAt     DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME(),
    GeneratedBy     NVARCHAR(256) NOT NULL,
    SourceEventIds  NVARCHAR(MAX) NULL, -- JSON array of source event/report IDs
    ContentHash     CHAR(64) NOT NULL,
    SignatureAlgo   NVARCHAR(32) NOT NULL DEFAULT 'SHA-256',
    Signature       NVARCHAR(MAX) NULL,
    FileSize        BIGINT NULL,
    IsVerified      BIT NOT NULL DEFAULT 1,
    VerifiedAt      DATETIME2 NULL,
    VerifiedBy      NVARCHAR(256) NULL
  );
END;
GO

-- ===== 4. Collector Blueprints =====

IF NOT EXISTS (SELECT 1 FROM sys.schemas WHERE name = 'deploy')
  EXEC('CREATE SCHEMA deploy');
GO

IF OBJECT_ID('deploy.CollectorBlueprint', 'U') IS NULL
BEGIN
  CREATE TABLE deploy.CollectorBlueprint (
    BlueprintId     INT IDENTITY(1,1) PRIMARY KEY,
    CollectorType   NVARCHAR(64) NOT NULL, -- PowerShell, Python, AgentService
    Engine          NVARCHAR(64) NOT NULL, -- SQLServer, Oracle, PostgreSQL, MySQL, AzureSQL, AWSRDS
    BlueprintName   NVARCHAR(256) NOT NULL,
    Description     NVARCHAR(MAX) NULL,
    PermissionsRequired NVARCHAR(MAX) NOT NULL, -- JSON array of {permission, reason, scope}
    DeploymentSteps NVARCHAR(MAX) NOT NULL, -- JSON array of steps
    SecurityNotes   NVARCHAR(MAX) NULL,
    ScriptTemplate  NVARCHAR(MAX) NULL,
    MinVersion      NVARCHAR(32) NULL,
    IsActive        BIT NOT NULL DEFAULT 1
  );
END;
GO

-- ===== 5. Brand & Legal Configuration =====

IF OBJECT_ID('config.BrandConfig', 'U') IS NULL
BEGIN
  CREATE TABLE config.BrandConfig (
    ConfigKey       NVARCHAR(128) NOT NULL PRIMARY KEY,
    ConfigValue     NVARCHAR(MAX) NOT NULL,
    Category        NVARCHAR(32) NOT NULL, -- Brand, Legal, Contact, Social
    IsEditable      BIT NOT NULL DEFAULT 0,
    Description     NVARCHAR(256) NULL
  );
END;
GO

IF OBJECT_ID('config.LegalSurface', 'U') IS NULL
BEGIN
  CREATE TABLE config.LegalSurface (
    SurfaceId       INT IDENTITY(1,1) PRIMARY KEY,
    SurfaceType     NVARCHAR(32) NOT NULL, -- TermsOfService, PrivacyPolicy, AcceptableUse, DataProcessing, Subscription, CookiePolicy
    Title           NVARCHAR(256) NOT NULL,
    VersionTag      NVARCHAR(32) NOT NULL,
    EffectiveDate   DATETIME2 NOT NULL,
    ContentHtml     NVARCHAR(MAX) NOT NULL,
    IsActive        BIT NOT NULL DEFAULT 1
  );
END;
GO

-- ===== 6. Truth-First Data Collection State =====

IF OBJECT_ID('ctl.DataCollectionState', 'U') IS NULL
BEGIN
  CREATE TABLE ctl.DataCollectionState (
    StateId         BIGINT IDENTITY(1,1) PRIMARY KEY,
    ServerId        UNIQUEIDENTIFIER NOT NULL,
    Domain          NVARCHAR(64) NOT NULL, -- Telemetry, Security, Compliance, Backup, HADR, Inventory, Patches, Waits
    CollectionState NVARCHAR(32) NOT NULL, -- Collected, NotYetCollected, NotPermitted, NotApplicable, CollectionFailed
    LastAttemptAt   DATETIME2 NULL,
    LastSuccessAt   DATETIME2 NULL,
    FailureReason   NVARCHAR(512) NULL,
    CollectorId     NVARCHAR(64) NULL,
    CONSTRAINT UQ_CollState UNIQUE (ServerId, Domain)
  );
END;
GO

-- ===== 7. Multi-Tenant Enforcement =====

IF OBJECT_ID('ctl.TenantIsolationConfig', 'U') IS NULL
BEGIN
  CREATE TABLE ctl.TenantIsolationConfig (
    TenantId        UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
    TenantName      NVARCHAR(256) NOT NULL,
    IsEnabled       BIT NOT NULL DEFAULT 1,
    IsolationMode   NVARCHAR(16) NOT NULL DEFAULT 'Strict', -- Strict, Shared, Hybrid
    DataResidency   NVARCHAR(64) NULL,
    MaxServers      INT NULL,
    MaxUsers        INT NULL,
    AuditAll        BIT NOT NULL DEFAULT 1,
    CreatedAt       DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME()
  );
END;
GO

-- ===== 8. Product Naming Registry =====

IF OBJECT_ID('config.ProductNaming', 'U') IS NULL
BEGIN
  CREATE TABLE config.ProductNaming (
    NameKey         NVARCHAR(128) NOT NULL PRIMARY KEY,
    DisplayLabel    NVARCHAR(256) NOT NULL,
    NavigationLabel NVARCHAR(64) NULL,
    Category        NVARCHAR(32) NOT NULL, -- Module, Page, Feature, Engine, Tier
    SortOrder       INT NOT NULL DEFAULT 0,
    IsLocked        BIT NOT NULL DEFAULT 1,
    Description     NVARCHAR(256) NULL
  );
END;
GO

-- ===== 9. Executive Proof Snapshots =====

IF OBJECT_ID('analytics.ExecutiveProofSnapshot', 'U') IS NULL
BEGIN
  CREATE TABLE analytics.ExecutiveProofSnapshot (
    SnapshotId      UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID() PRIMARY KEY,
    TenantId        UNIQUEIDENTIFIER NULL,
    GeneratedAt     DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME(),
    TotalServers    INT NOT NULL,
    DataAtRisk      NVARCHAR(MAX) NOT NULL, -- JSON: sensitive data summary
    AccessExposure  NVARCHAR(MAX) NOT NULL, -- JSON: who can access what
    RecoveryPosture NVARCHAR(MAX) NOT NULL, -- JSON: recoverability summary
    CompliancePosture NVARCHAR(MAX) NOT NULL, -- JSON: compliance summary
    FinancialExposure NVARCHAR(MAX) NOT NULL, -- JSON: risk $ value
    TopActions      NVARCHAR(MAX) NOT NULL, -- JSON: highest-impact actions
    FleetHealthScore INT NOT NULL,
    OverallRiskScore INT NOT NULL
  );
END;
GO

-- ===== Seed: Brand Configuration =====

IF NOT EXISTS (SELECT 1 FROM config.BrandConfig WHERE ConfigKey = 'ProductName')
BEGIN
  INSERT INTO config.BrandConfig (ConfigKey, ConfigValue, Category, IsEditable, Description) VALUES
    ('ProductName',       'DBAOps Sovereign™',                        'Brand',   0, 'Full product name with trademark'),
    ('ProductShortName',  'DBAOps Sovereign',                         'Brand',   0, 'Short product name'),
    ('ProductTagline',    'Govern Everything. Command Every Fleet.',   'Brand',   0, 'Primary tagline'),
    ('CompanyName',       'RHOYLLE INNOVATION EMPIRE LLC',            'Brand',   0, 'Legal entity name'),
    ('TrademarkSerial',   '99717776',                                 'Brand',   0, 'DBAOps™ Serial Number'),
    ('CopyrightNotice',   'Copyright © 2026 RHOYLLE INNOVATION EMPIRE LLC. All rights reserved.', 'Legal', 0, 'Copyright string'),
    ('SupportEmail',      'support@dbaops.solutions',                 'Contact', 1, 'Support email address'),
    ('SalesEmail',        'sales@dbaops.solutions',                   'Contact', 1, 'Sales email address'),
    ('LegalEmail',        'legal@rhoylle.com',                        'Contact', 1, 'Legal inquiries email'),
    ('WebsiteUrl',        'https://www.dbaops.solutions',             'Contact', 1, 'Primary website'),
    ('PortalUrl',         'https://portal.dbaopsframework.com',       'Contact', 1, 'Customer portal'),
    ('FooterHtml',        '<p>DBAOps Sovereign™ — Govern Everything. Command Every Fleet.</p><p>Powered by RHOYLLE INNOVATION EMPIRE LLC · DBAOps™ Serial No. 99717776</p>', 'Legal', 0, 'Standard footer HTML'),
    ('PDFHeaderHtml',     '<h1>DBAOps Sovereign™</h1><p>RHOYLLE INNOVATION EMPIRE LLC · Confidential</p>', 'Legal', 0, 'PDF export header'),
    ('EmailSignatureHtml','<p>DBAOps Sovereign™ — RHOYLLE INNOVATION EMPIRE LLC</p><p>www.dbaops.solutions | Serial No. 99717776</p>', 'Legal', 0, 'Email template signature');
END;
GO

-- ===== Seed: Legal Surfaces =====

IF NOT EXISTS (SELECT 1 FROM config.LegalSurface WHERE SurfaceType = 'TermsOfService')
BEGIN
  INSERT INTO config.LegalSurface (SurfaceType, Title, VersionTag, EffectiveDate, ContentHtml) VALUES
    ('TermsOfService',    'Terms of Service',        'v1.0', '2026-03-01', '<h2>Terms of Service</h2><p>By using DBAOps Sovereign™, you agree to these terms...</p><p>RHOYLLE INNOVATION EMPIRE LLC reserves all rights.</p>'),
    ('PrivacyPolicy',     'Privacy Policy',          'v1.0', '2026-03-01', '<h2>Privacy Policy</h2><p>DBAOps Sovereign™ is designed for 100% on-premises operation. No telemetry is sent externally unless explicitly configured.</p>'),
    ('AcceptableUse',     'Acceptable Use Policy',   'v1.0', '2026-03-01', '<h2>Acceptable Use</h2><p>DBAOps Sovereign™ may only be used in accordance with your license agreement.</p>'),
    ('DataProcessing',    'Data Processing Agreement','v1.0', '2026-03-01', '<h2>DPA</h2><p>All data processed by DBAOps Sovereign™ remains within customer-controlled infrastructure.</p>'),
    ('Subscription',      'Subscription Agreement',  'v1.0', '2026-03-01', '<h2>Subscription</h2><p>Your subscription tier determines available features, instance limits, and support levels.</p>');
END;
GO

-- ===== Seed: Collector Blueprints =====

IF NOT EXISTS (SELECT 1 FROM deploy.CollectorBlueprint WHERE CollectorType = 'PowerShell' AND Engine = 'SQLServer')
BEGIN
  INSERT INTO deploy.CollectorBlueprint (CollectorType, Engine, BlueprintName, Description, PermissionsRequired, DeploymentSteps, SecurityNotes) VALUES
    ('PowerShell', 'SQLServer', 'SQL Server Telemetry Collector', 'Collects CPU, memory, disk, waits, blocking, and query stats from SQL Server instances',
     '[{"permission":"VIEW SERVER STATE","reason":"Read DMVs for performance counters, wait stats, and session info","scope":"Server"},{"permission":"VIEW DATABASE STATE","reason":"Read database-level DMVs for file stats, index usage","scope":"AllDatabases"},{"permission":"SELECT on sys.databases","reason":"Enumerate databases and their properties","scope":"Server"},{"permission":"CONNECT SQL","reason":"Establish connection to the SQL Server instance","scope":"Server"}]',
     '[{"step":1,"action":"Create a dedicated SQL login: CREATE LOGIN [DBAOpsSvc] FROM WINDOWS"},{"step":2,"action":"Grant minimum permissions: GRANT VIEW SERVER STATE TO [DBAOpsSvc]"},{"step":3,"action":"Grant database access: USE [msdb]; CREATE USER [DBAOpsSvc] FOR LOGIN [DBAOpsSvc]"},{"step":4,"action":"Deploy collector script to scheduled task or agent job"},{"step":5,"action":"Configure ingest endpoint URL in collector config"},{"step":6,"action":"Test with: .\\Collect-Telemetry.ps1 -InstanceName YOURSERVER -DryRun"}]',
     'Use a gMSA (Group Managed Service Account) when possible. Never use sa or sysadmin. The collector only needs read access — it never modifies data.'),
    ('PowerShell', 'SQLServer', 'SQL Server Security Collector', 'Collects TDE status, TLS config, login inventory, credential hygiene, and audit settings',
     '[{"permission":"VIEW SERVER STATE","reason":"Read security-related DMVs","scope":"Server"},{"permission":"VIEW ANY DEFINITION","reason":"Read encryption and certificate metadata","scope":"Server"},{"permission":"SELECT on sys.server_principals","reason":"Enumerate logins and their properties","scope":"Server"},{"permission":"SELECT on sys.certificates","reason":"Read certificate expiry and usage info","scope":"Server"}]',
     '[{"step":1,"action":"Use the same service account as telemetry collector"},{"step":2,"action":"Grant: GRANT VIEW ANY DEFINITION TO [DBAOpsSvc]"},{"step":3,"action":"Deploy Collect-Security.ps1 to scheduled task"},{"step":4,"action":"Configure scan frequency (recommended: every 6 hours)"},{"step":5,"action":"Test with: .\\Collect-Security.ps1 -InstanceName YOURSERVER -DryRun"}]',
     'Security collection is read-only. It inspects configurations but never changes them.'),
    ('Python', 'PostgreSQL', 'PostgreSQL Telemetry Collector', 'Collects CPU, connections, locks, table/index stats from PostgreSQL instances',
     '[{"permission":"pg_monitor role","reason":"Read pg_stat_* views without superuser","scope":"Cluster"},{"permission":"CONNECT","reason":"Establish connection to database","scope":"Database"},{"permission":"SELECT on pg_stat_activity","reason":"View active sessions and queries","scope":"Cluster"}]',
     '[{"step":1,"action":"Create role: CREATE ROLE dbaops_collector LOGIN PASSWORD ''xxx''"},{"step":2,"action":"Grant: GRANT pg_monitor TO dbaops_collector"},{"step":3,"action":"Install Python collector: pip install dbaops-collector"},{"step":4,"action":"Configure: dbaops-collect config --host PG_HOST --ingest-url URL"},{"step":5,"action":"Test: dbaops-collect test --host PG_HOST"}]',
     'Use pg_monitor role — never superuser. Connection should use SSL.'),
    ('Python', 'Oracle', 'Oracle Telemetry Collector', 'Collects performance, tablespace, ASM, RAC, and session data from Oracle instances',
     '[{"permission":"SELECT_CATALOG_ROLE","reason":"Read data dictionary views for performance and configuration","scope":"Instance"},{"permission":"SELECT on V$ views","reason":"Read dynamic performance views","scope":"Instance"},{"permission":"CREATE SESSION","reason":"Connect to Oracle instance","scope":"Instance"}]',
     '[{"step":1,"action":"Create user: CREATE USER dbaops_collector IDENTIFIED BY xxx"},{"step":2,"action":"Grant: GRANT SELECT_CATALOG_ROLE, CREATE SESSION TO dbaops_collector"},{"step":3,"action":"Install: pip install dbaops-collector[oracle]"},{"step":4,"action":"Configure connection string and ingest URL"},{"step":5,"action":"Test: dbaops-collect test --engine oracle --host ORA_HOST"}]',
     'Never grant DBA or SYSDBA. SELECT_CATALOG_ROLE provides read-only access to all necessary dictionary views.');
END;
GO

-- ===== Seed: Product Naming Registry =====

IF NOT EXISTS (SELECT 1 FROM config.ProductNaming WHERE NameKey = 'mod.commandCenter')
BEGIN
  INSERT INTO config.ProductNaming (NameKey, DisplayLabel, NavigationLabel, Category, SortOrder) VALUES
    ('mod.commandCenter',     'Command Center',          'Command Center',    'Module',  1),
    ('mod.fleetCommand',      'Fleet Command',           'Fleet',             'Module',  2),
    ('mod.telemetry',         'Real-Time Telemetry',     'Telemetry',         'Module',  3),
    ('mod.complianceEngine',  'Compliance Engine',       'Compliance',        'Module',  4),
    ('mod.securityGuardian',  'Security Guardian',       'Security',          'Module',  5),
    ('mod.automationEngine',  'Automation Engine',       'Operations',        'Module',  6),
    ('mod.intelligenceEngine','Intelligence Engine',     'AI Insights',       'Module',  7),
    ('mod.recoverability',    'Recoverability Assurance', 'Recoverability',   'Module',  8),
    ('mod.assuranceGraph',    'Assurance Graph',         'Assurance Graph',   'Module',  9),
    ('mod.policyEngine',      'Policy-as-Code Engine',   'Policy Engine',     'Module', 10),
    ('mod.dataSovereignty',   'Data Sovereignty',        'Data Sovereignty',  'Module', 11),
    ('mod.selfHealing',       'Self-Healing Infrastructure', 'Self-Healing',  'Module', 12),
    ('mod.finops',            'Predictive Cost Intelligence', 'FinOps',       'Module', 13),
    ('mod.fleetIntelligence', 'Unified Estate Intelligence', 'Fleet Intel',  'Module', 14),
    ('mod.knowledgeSystem',   'Knowledge Amplification', 'AI Mentor',        'Module', 15),
    ('mod.cryptoChain',       'Cryptographic Chain of Custody', 'Audit Chain','Module', 16),
    ('mod.dataClassification','Intelligent Data Classification', 'Discovery', 'Module', 17),
    ('mod.exceptionGov',      'Exception Governance',    'Exceptions',       'Module', 18),
    ('mod.compliancePacks',   'Compliance Packs',        'Compliance Packs', 'Module', 19),
    ('mod.executiveProof',    'Executive Proof Dashboard','Executive Proof',  'Module', 20);
END;
GO

PRINT 'Schema v10 (Supreme Polish) applied successfully.';
GO
