Ошибка 42710 (FK таблиц) после добавления в БО второго поля ссылки на объект (тот же)

Версия приложения: 4.7.0.23243

Есть БО следующего вида
image


Поля 1 и 2 ссылаются на один и тот же БО

Добавление в БО поля 2 (Надзирающий территориальный орган) вызывает ошибку синхронизации:

ALTER TABLE "public"."facts_opo_reestr" ADD CONSTRAINT "FK_public.facts_opo_reestr_public.rtn_contragent_rtn_contragent_4" FOREIGN KEY ("rtn_contragent_4") REFERENCES "public"."rtn_contragent" ("Id")

-- Failed in 15 ms with error: 42710: constraint "FK_public.facts_opo_reestr_public.rtn_contragent_rtn_contragent" for relation "facts_opo_reestr" already exists

Disposed transaction at 5/20/2021 9:02:37 AM +03:00

42710: constraint "FK_public.facts_opo_reestr_public.rtn_contragent_rtn_contragent" for relation "facts_opo_reestr" already exists

Ошибка проведения миграций: 42710: constraint "FK_public.facts_opo_reestr_public.rtn_contragent_rtn_contragent" for relation "facts_opo_reestr" already exists

Насколько я понял причина в том что Альфа создает FK с именем на основе таблицы на которую идет ссылка, не учитывая что таких полей в одном БО может быть более одного.

Вот json данного БО

{
	"Components": [
		{
			"Type": 1,
			"Id": "facts_OPO_reestr",
			"IsDependency": false,
			"Data": {
				"Code": "facts_OPO_reestr",
				"Description": "",
				"Title": "Реестр ОПО",
				"ShowRegistry": false,
				"StorageSubType": "Rdbms",
				"IsHierarchical": false,
				"IsVersioning": false,
				"StorageInfo": {
					"ConnectionCode": "Rdbms",
					"StorageName": "facts_opo_reestr",
					"QueryText": null,
					"PipelineId": null,
					"BaseTypeId": null
				},
				"MainTabName": "Основное",
				"FilterExpression": "FIELD(\"rtn_contragent_1\")=[p_rtn_contragent]",
				"DisplayPropertyName": "",
				"Fields": [
					{
						"Caption": "Регистрирующий территориальный орган",
						"AvailableValues": [],
						"Code": "rtn_contragent_1",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "rtn_contragent",
							"FaceField": "short_name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "rtn_contragent"
					},
					{
						"Caption": "Надзирающий территориальный орган",
						"AvailableValues": [],
						"Code": "rtn_contragent_4",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "rtn_contragent",
							"FaceField": "short_name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "rtn_contragent"
					},
					{
						"Caption": "Эксплуатирующая организация",
						"AvailableValues": [],
						"Code": "dim_usage_organisation",
						"Description": null,
						"EmptyText": null,
						"FieldType": 14,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "dim_usage_organisation",
							"FaceField": "short_name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": null,
						"Children": [
							{
								"Caption": "Полное наименование",
								"AvailableValues": [],
								"Code": "full_name",
								"Description": null,
								"EmptyText": null,
								"FieldType": 0,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": null
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							},
							{
								"Caption": "ИНН",
								"AvailableValues": [],
								"Code": "inn",
								"Description": null,
								"EmptyText": null,
								"FieldType": 2,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": 64
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							},
							{
								"Caption": "Юридический адрес",
								"AvailableValues": [],
								"Code": "legal_address",
								"Description": null,
								"EmptyText": null,
								"FieldType": 0,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": null
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							}
						],
						"ReferenceTypeId": "dim_usage_organisation"
					},
					{
						"Caption": "Статус объекта ОПО",
						"AvailableValues": [],
						"Code": "dim_opo_state",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "dim_opo_state",
							"FaceField": "name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "dim_opo_state"
					},
					{
						"Caption": "Наименование объекта",
						"AvailableValues": [],
						"Code": "so_name",
						"Description": null,
						"EmptyText": null,
						"FieldType": 0,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": null,
							"FaceField": null,
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": null
					},
					{
						"Caption": "Регистрационный номер ",
						"AvailableValues": [],
						"Code": "registration_number",
						"Description": null,
						"EmptyText": null,
						"FieldType": 0,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": null,
							"FaceField": null,
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": null
					},
					{
						"Caption": "Местонахождение объекта",
						"AvailableValues": [],
						"Code": "opo_address_name",
						"Description": null,
						"EmptyText": null,
						"FieldType": 0,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": null,
							"FaceField": null,
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": null
					},
					{
						"Caption": "Типовое наименование объекта",
						"AvailableValues": [],
						"Code": "nsi_typical_object_name",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "load_nsi_typical_object_names",
							"FaceField": "name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "load_nsi_typical_object_names"
					},
					{
						"Caption": "Классы опасности ОПО",
						"AvailableValues": [],
						"Code": "dim_danger_class",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "dim_danger_class",
							"FaceField": "Name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "dim_danger_class"
					},
					{
						"Caption": "Признаки опасности",
						"AvailableValues": [],
						"Code": "dim_opo_danger_sign",
						"Description": null,
						"EmptyText": null,
						"FieldType": 13,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": null,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "dim_opo_danger_sign",
							"FaceField": "name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": null,
						"Children": [
							{
								"Caption": "Код",
								"AvailableValues": [],
								"Code": "code",
								"Description": null,
								"EmptyText": null,
								"FieldType": 0,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": null
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							},
							{
								"Caption": "Наименование",
								"AvailableValues": [],
								"Code": "name",
								"Description": null,
								"EmptyText": null,
								"FieldType": 0,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": null
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							},
							{
								"Caption": "Вид объекта",
								"AvailableValues": [],
								"Code": "object_kind",
								"Description": null,
								"EmptyText": null,
								"FieldType": 2,
								"IsInternal": false,
								"Options": {
									"HideCondition": null,
									"ReadOnlyCondition": null,
									"EmptyText": null,
									"Interval": null,
									"ReferenceData": null,
									"MultipleSelect": null,
									"Devider": null,
									"Required": null,
									"DefaultValue": null,
									"ConditionalDefaultValue": null,
									"IsNullable": null,
									"AsArray": null,
									"MaximumLength": null,
									"DecimalPrecision": null,
									"AllocationCoefficientTypeId": null,
									"FilterFieldСode": null,
									"ReplaceFieldCode": null,
									"MaskRe": null,
									"MaskReText": null,
									"JsEditor": null,
									"allowBlank": null,
									"ReadOnly": null,
									"ArrayElement": null,
									"ValidateFormula": null,
									"ValidateErrorText": null,
									"MinimumValue": null,
									"MaximumValue": null,
									"referenceIdentifier": null,
									"JsColumn": null,
									"ThousandSeparator": null,
									"DecimalSeparator": null,
									"ReferenceTypeId": null,
									"FaceField": null,
									"ReferenceFilter": null,
									"FieldDict": null,
									"BitSize": 32
								},
								"Calculated": false,
								"Formula": "",
								"Children": [],
								"ReferenceTypeId": null
							}
						],
						"ReferenceTypeId": "dim_opo_danger_sign"
					}
				],
				"Parameters": [
					{
						"Caption": "Регистрирующий территориальный орган",
						"AvailableValues": [],
						"Code": "p_rtn_contragent",
						"Description": null,
						"EmptyText": null,
						"FieldType": 6,
						"IsInternal": false,
						"Options": {
							"HideCondition": null,
							"ReadOnlyCondition": null,
							"EmptyText": null,
							"Interval": null,
							"ReferenceData": null,
							"MultipleSelect": null,
							"Devider": null,
							"Required": true,
							"DefaultValue": null,
							"ConditionalDefaultValue": null,
							"IsNullable": null,
							"AsArray": null,
							"MaximumLength": null,
							"DecimalPrecision": null,
							"AllocationCoefficientTypeId": null,
							"FilterFieldСode": null,
							"ReplaceFieldCode": null,
							"MaskRe": null,
							"MaskReText": null,
							"JsEditor": null,
							"allowBlank": null,
							"ReadOnly": null,
							"ArrayElement": null,
							"ValidateFormula": null,
							"ValidateErrorText": null,
							"MinimumValue": null,
							"MaximumValue": null,
							"referenceIdentifier": null,
							"JsColumn": null,
							"ThousandSeparator": null,
							"DecimalSeparator": null,
							"ReferenceTypeId": "rtn_contragent",
							"FaceField": "short_name",
							"ReferenceFilter": null,
							"FieldDict": null,
							"BitSize": null
						},
						"Calculated": false,
						"Formula": "",
						"Children": [],
						"ReferenceTypeId": "rtn_contragent"
					}
				],
				"Indexes": [],
				"Relationships": [],
				"Actions": [],
				"EventActions": [],
				"Groups": [
					"Отчеты ОПО"
				]
			}
		}
	],
	"RolesWithAccess": [],
	"DisplayNames": [
		{
			"Type": 1,
			"Id": "facts_OPO_reestr",
			"DisplayName": "Реестр ОПО"
		},
		{
			"Type": 1,
			"Id": "rtn_contragent",
			"DisplayName": "Территориальные органы РТН"
		},
		{
			"Type": 1,
			"Id": "dim_usage_organisation",
			"DisplayName": "Организации, эксплуатирующие ОПО "
		},
		{
			"Type": 1,
			"Id": "dim_opo_state",
			"DisplayName": "ОПО. Статус регистрации"
		},
		{
			"Type": 1,
			"Id": "load_nsi_typical_object_names",
			"DisplayName": "Типовые наименования ОПО"
		},
		{
			"Type": 1,
			"Id": "dim_danger_class",
			"DisplayName": "Классы опасности ОПО"
		},
		{
			"Type": 1,
			"Id": "dim_opo_danger_sign",
			"DisplayName": "ОПО. Признаки опасности"
		}
	],
	"RoleInfos": [],
	"RoleDisplayNames": [],
	"CubeAccessRules": [],
	"Version": 18,
	"Id": "7f48c7c1-0060-4e59-aad8-8abfe9022827",
	"AuthorName": "Администратор",
	"Timestamp": "2021-05-20T09:11:31.383677",
	"Comment": "Проверка ошибки"
}

На релизной схеме http://192.168.228.231/release_4_7_0/ воспроизводится

На данный момент на релизной схеме удалил из БО второе Поле со ссылкой и ошибка ушла

Возможность иметь несколько разных полей учитывается (например, в FK_public.facts_opo_reestr_public.rtn_contragent_rtn_contragent_4 присутствует код поля rtn_contragent_4).

Эта ошибка связана с тем, что суммарная длина кодов объектов и полей превысила 63 символа. PostgreSQL использует только первые 63 символа из всех имен (это касается всех имен: для таблиц, полей, индексов, ограничений, алиасов).
В данном случае имена ограничений отличаются в символах после 63-го.

Пока могу посоветовать сделать имя полей короче; для данного примера нужно укоротить код поля rtn_contragent_4 на 2 символа.

К сожалению, эта проблема давняя; полноценное решение еще не реализовано.

Ок, это поправимо. Спасибо

image
Все получилось - еще раз спасибо. Вопрос закрыт