So I tried my earlier suggestion and this is my findings.
Developer 1 makes the change to the db and does a db first sync in the LLBLGen designer getting the model in sync.
He/she then checks in the project file, which create a patch like this:
--- a/src/TheHub.Entities.llblgenproj
+++ b/src/TheHub.Entities.llblgenproj
@@ -223,6 +223,7 @@
<Field Name="DaysBeforeEmail" Type="int" IsOptional="true" Precision="10" />
<Field Name="Description" Type="string" IsOptional="true" MaxLength="100" />
<Field Name="Key" Type="int" Precision="10" IsPrimaryKey="true" />
+ <Field Name="NewCol2" Type="int" IsOptional="true" Precision="10" />
<Field Name="SetByUserId" Type="string" IsOptional="true" MaxLength="50" />
<Field Name="SetLocalDateTime" Type="datetime" IsOptional="true">
<OutputSettingValues>
@@ -6858,9 +6859,9 @@
<Sequence Name="@@IDENTITY" />
</SystemSequences>
<Catalogs>
- <Catalog Name="TBH" SyncSource="1">
+ <Catalog Name="TBH">
<Schemas>
- <Schema Name="dbo" SyncSource="2" LastSyncWithDatabase="2019-05-03T19:27:38.2502937Z">
+ <Schema Name="dbo" SyncSource="2" LastSyncWithDatabase="2019-05-10T12:36:13.2432922Z">
<Tables>
<Table Name="HSE_ALERT">
<PkConstraintName Name="PK__HSE_ALER__4A5467AC32774862" />
@@ -6875,6 +6876,7 @@
<Field Name="set_local_dtm" Ordinal="8" IsOptional="true" DbType="4" />
<Field Name="alert_description" Ordinal="9" IsOptional="true" DbType="12" Length="100" />
<Field Name="days_before_email_nbr" Ordinal="10" IsOptional="true" DbType="8" Precision="10" />
+ <Field Name="new_col2" Ordinal="11" IsOptional="true" DbType="8" Precision="10" />
</Fields>
</Table>
<Table Name="HSE_ARCHIVE_CLAIM">
@@ -13169,6 +13171,7 @@
<FieldMapping FieldName="DaysBeforeEmail" TargetFieldName="days_before_email_nbr" />
<FieldMapping FieldName="Description" TargetFieldName="alert_description" />
<FieldMapping FieldName="Key" TargetFieldName="alert_key" SequenceToUse="SCOPE_IDENTITY()" />
+ <FieldMapping FieldName="NewCol2" TargetFieldName="new_col2" />
<FieldMapping FieldName="SetByUserId" TargetFieldName="set_by_user_id" />
<FieldMapping FieldName="SetLocalDateTime" TargetFieldName="set_local_dtm" />
</FieldMappings>
Developer 2 does a pull and cherry picks the changes from the project file ignoring the Field in the Table and deleting the
TargetFieldName="new_col2"
in the FieldMapping.
He/she then opens the project in the LLBLGen designer and does a model first sync which identifies the chang.
Then does a Generate Update schema and gets
ALTER TABLE [dbo].[HSE_ALERT]
ADD [NewCol2] [int] NULL
Which can then be applied and finally reverts the cherry pick and does a normal pull/merge.
This seems to work and I suppose some of this could be automated (i.e. the cherry pick and editing of the llblgen project file).