Migration script fires 'The data definition language (DDL) command cannot be executed at the Subscriber'
We found traces of a replication that had been activated in the past in a specific table.

Replication was not fully removed from this table. 

We also notice that the script works in different database name (a database with the same structure). 

Here is the history:


We restored database from DATABASE_A (with traces of replacation) to DATABASE_B
We run the stript on DATABASE_B and it works
We run the script on DATABASE_A and it fails


Our DBA found traces of replication in DATABASE_A and in order to clean up the replication traces, he had run: 

sp_removedbreplication 'DATABASE_A'


I am not sure if there is something configured on system tables in SQL Server that are related to the name DATABASE_A. We are going to investigate this issue deeper to find dependencies or what is causing the error.