I ran into an issue where a db script in an Acumatica package does not work. I see it run, but the change in the db just doesn’t happen. If I run the same script in SSMS, it works. I do make sure that I either tweak the script comment or publish with cleanup so that the script isn’t skipped during publish, and the log says it ran, but it doesn’t work. For example, I have a simple create table script...
IF (NOT EXISTS (
SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'EEdiEntityType'))
BEGIN
CREATE TABLE [dbo].[EEdiEntityType](
[CompanyID] [int] NOT NULL,
[EntityType] [int] NOT NULL,
[Description] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_EEdiEntityType] PRIMARY KEY CLUSTERED
(
[CompanyID] ASC,
[EntityType] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
I added this script to my package, deployed it, it says it runs, but no new table.
Acumatica v17.209.0028