You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our current project where we trying to upgrade SS3 to SS4 with this library we have realized that some tables are not created correctly (usually missing default values for ClassName etc.), we are able to fix almost everything by manual changes of database structure, but after dev/build task all changes are replaced.
System:
PHP7.2, IIS, SQL SErver Express (2012)
Sample table structure with incorrect table structure:
createtableChangeSetItem
(
ID int identity
constraint PK__ChangeSe__3214EC27AF81A266
primary key,
ClassName varchar(36) not null,
LastEdited datetime,
Created datetime,
VersionBefore int default 0not null,
VersionAfter int default 0not null,
Added varchar(10) default 'implicitly'not nullconstraint ChangeSetItem_Added_check
check ([Added] ='implicitly'OR [Added] ='explicitly'),
ChangeSetID int default 0not null,
ObjectID int default 0not null,
ObjectClass varchar(40) default 'SearchTag'not null
)
go
The text was updated successfully, but these errors were encountered:
I encountered same problem - ClassName constraint didn't update after it was created initially.
Server: PHP 7.2., IIS, MS SQL 2019
Installation:
SS 4.7.2
silverstripe/mssql: 2.0.3
tractorcow/silverstripe-fluent: 5.0.0
dnadesign/silverstripe-elemental: 4.0.0
I found error or should I say incomplete regex in MSSQLSchemaManager which wasn't able to read constraint definition if they contained symbol "" in it. ClassName contains namespaces which contain a lot of backslashes :)
I added PR #61 which adds support to backslashes, and now it works fine.
On our current project where we trying to upgrade SS3 to SS4 with this library we have realized that some tables are not created correctly (usually missing default values for ClassName etc.), we are able to fix almost everything by manual changes of database structure, but after dev/build task all changes are replaced.
System:
PHP7.2, IIS, SQL SErver Express (2012)
Sample table structure with incorrect table structure:
The text was updated successfully, but these errors were encountered: