text: CREATE TABLE "SystemUserSet" ("optevia_Language_Id" UUID, "optevia_Language_LogicalName" TEXT, "optevia_Language_Name" TEXT, "optevia_Number" TEXT, "QueueId_Id" UUID, "QueueId_LogicalName" TEXT, "QueueId_Name" TEXT, "CreatedBy_Id" UUID, "CreatedBy_LogicalName" TEXT, "CreatedBy_Name" TEXT, "PreferredAddressCode_Value" INTEGER, "NickName" TEXT, "Address1_Latitude" FLOAT, "Address2_StateOrProvince" TEXT, "optevia_Address2" TEXT, "optevia_OG_USERDATA_ID" TEXT, "optevia_UKRegion_Id" UUID, "optevia_UKRegion_LogicalName" TEXT, "optevia_UKRegion_Name" TEXT, "optevia_towncity" TEXT, "optevia_CountryCode" TEXT, "optevia_Extension" TEXT, "optevia_Address1" TEXT, "Address1_County" TEXT, "VersionNumber" BIGINT, "Address2_Country" TEXT, "optevia_ConcatenatedAddress" TEXT, "Address2_PostOfficeBox" TEXT, "PreferredPhoneCode_Value" INTEGER, "optevia_Serviceproviderprimaryaddress" TEXT, "Title" TEXT, "SetupUser" BOOLEAN, "optevia_LocallanguageSuffix" TEXT, "FirstName" TEXT, "optevia_Country_Id" UUID, "optevia_Country_LogicalName" TEXT, "optevia_Country_Name" TEXT, "EmployeeId" TEXT, "TerritoryId_Id" UUID, "TerritoryId_LogicalName" TEXT, "TerritoryId_Name" TEXT, "JobTitle" TEXT, "optevia_emailaddresstype_Id" UUID, "optevia_emailaddresstype_LogicalName" TEXT, "optevia_emailaddresstype_Name" TEXT, "optevia_OG_CREATED_BY" TEXT, "optevia_og_systemuser_id" TEXT, "Skills" TEXT, "CalendarId_Id" UUID, "CalendarId_LogicalName" TEXT, "CalendarId_Name" TEXT, "optevia_LocalLanguagePostcode" TEXT, "optevia_SecurityRoleConfiguration" TEXT, "IsIntegrationUser" BOOLEAN, "optevia_Title_Id" UUID, "optevia_Title_LogicalName" TEXT, "optevia_Title_Name" TEXT, "Address1_PostalCode" TEXT, "Address2_AddressId" UUID, "optevia_Nationality_Id" UUID, "optevia_Nationality_LogicalName" TEXT, "optevia_Nationality_Name" TEXT, "optevia_SourceObsolete" INTEGER, "WindowsLiveID" TEXT, "optevia_PostCode" TEXT, "Address1_Line3" TEXT, "DisabledReason" TEXT, "Address2_UTCOffset" INTEGER, "Address1_Line2" TEXT, "optevia_AddressComment" TEXT, "Address1_City" TEXT, "PersonalEMailAddress" TEXT, "optevia_Suffix" TEXT, "Address1_Telephone2" TEXT, "CreatedOnBehalfBy_Id" UUID, "CreatedOnBehalfBy_LogicalName" TEXT, "CreatedOnBehalfBy_Name" TEXT, "BusinessUnitId_Id" UUID, "BusinessUnitId_LogicalName" TEXT, "BusinessUnitId_Name" TEXT, "Address1_Longitude" FLOAT, "OrganizationId" UUID, "YomiFirstName" TEXT, "ExchangeRate" DECIMAL(10,0), "optevia_IsAdvisor" BOOLEAN, "Address1_ShippingMethodCode_Value" INTEGER, "YomiMiddleName" TEXT, "optevia_Address3" TEXT, "Address2_Line2" TEXT, "detica_SpeicalDeiliveryProviderAdvisorId_Id" UUID, "detica_SpeicalDeiliveryProviderAdvisorId_LogicalName" TEXT, "detica_SpeicalDeiliveryProviderAdvisorId_Name" TEXT, "DefaultFiltersPopulated" BOOLEAN, "Address1_Line1" TEXT, "Address1_Telephone1" TEXT, "SystemUserId" UUID NOT NULL, "optevia_epiphanyuserid" TEXT, "optevia_telephonetype_Id" UUID, "optevia_telephonetype_LogicalName" TEXT, "optevia_telephonetype_Name" TEXT, "YomiLastName" TEXT, "optevia_OG_MODIFIED_BY" TEXT, "Address2_Latitude" FLOAT, "CALType_Value" INTEGER, "AccessMode_Value" INTEGER, "LastName" TEXT, "optevia_OG_EMAILADDRESS_ID" TEXT, "optevia_OG_CREATED" TIMESTAMP, "optevia_LocallanguageTitle" TEXT, "optevia_OG_EPIPHANYUSER_ID" TEXT, "detica_SpecialistDeliveryProviderOrderId_Id" UUID, "detica_SpecialistDeliveryProviderOrderId_LogicalName" TEXT, "detica_SpecialistDeliveryProviderOrderId_Name" TEXT, "InternalEMailAddress" TEXT, "optevia_OG_ADDRESS_ID" TEXT, "YomiFullName" TEXT, "MobilePhone" TEXT, "PhotoUrl" TEXT, "SiteId_Id" UUID, "SiteId_LogicalName" TEXT, "SiteId_Name" TEXT, "TransactionCurrencyId_Id" UUID, "TransactionCurrencyId_LogicalName" TEXT, "TransactionCurrencyId_Name" TEXT, "IsDisabled" BOOLEAN, "DomainName" TEXT, "optevia_OG_SERVICEPROVIDER_ID" TEXT, "optevia_OG_MODIFIED" TIMESTAMP, "PassportLo" INTEGER, "Address1_Name" TEXT, "Address2_Telephone2" TEXT, "EmailRouterAccessApproval_Value" INTEGER, "ParentSystemUserId_Id" UUID, "ParentSystemUserId_LogicalName" TEXT, "ParentSystemUserId_Name" TEXT, "optevia_LocationType_Id" UUID, "optevia_LocationType_LogicalName" TEXT, "optevia_LocationType_Name" TEXT, "optevia_Gender_Id" UUID, "optevia_Gender_LogicalName" TEXT, "optevia_Gender_Name" TEXT, "FullName" TEXT, "Address2_Longitude" FLOAT, "optevia_StateCounty" TEXT, "Salutation" TEXT, "Address2_City" TEXT, "MiddleName" TEXT, "Address1_AddressTypeCode_Value" INTEGER, "Address2_County" TEXT, "optevia_locallanguageaddress" TEXT, "optevia_OG_AGENT_ID" TEXT, "InviteStatusCode_Value" INTEGER, "Address2_Line1" TEXT, "Address2_UPSZone" TEXT, "Address1_UTCOffset" INTEGER, "Address2_ShippingMethodCode_Value" INTEGER, "PassportHi" INTEGER, "Address1_Country" TEXT, "optevia_Address4" TEXT, "Address1_Telephone3" TEXT, "optevia_AddressType_Id" UUID, "optevia_AddressType_LogicalName" TEXT, "optevia_AddressType_Name" TEXT, "Address2_PostalCode" TEXT, "Address2_Telephone1" TEXT, "optevia_pafoverride" BOOLEAN, "IsLicensed" BOOLEAN, "optevia_TelephoneNumber" TEXT, "GovernmentId" TEXT, "ModifiedOnBehalfBy_Id" UUID, "ModifiedOnBehalfBy_LogicalName" TEXT, "ModifiedOnBehalfBy_Name" TEXT, "optevia_AreaCode" TEXT, "Address2_Line3" TEXT, "IsSyncWithDirectory" BOOLEAN, "optevia_fullname" TEXT, "UTCConversionTimeZoneCode" INTEGER, "detica_PrimaryMarketOrderId_Id" UUID, "detica_PrimaryMarketOrderId_LogicalName" TEXT, "detica_PrimaryMarketOrderId_Name" TEXT, "optevia_OG_TELEPHONE_ID" TEXT, "ModifiedOn" TIMESTAMP, "ModifiedBy_Id" UUID, "ModifiedBy_LogicalName" TEXT, "ModifiedBy_Name" TEXT, "HomePhone" TEXT, "optevia_LocallanguageName" TEXT, "PreferredEmailCode_Value" INTEGER, "Address2_Name" TEXT, "OverriddenCreatedOn" TIMESTAMP, "Address1_UPSZone" TEXT, "ImportSequenceNumber" INTEGER, "Address1_AddressId" UUID, "optevia_Website" TEXT, "OutgoingEmailDeliveryMethod_Value" INTEGER, "MobileAlertEMail" TEXT, "optevia_fulltelephonenumber" TEXT, "Address2_AddressTypeCode_Value" INTEGER, "Address1_Fax" TEXT, "CreatedOn" TIMESTAMP, "optevia_HasServiceProviderChanged" BOOLEAN, "Address2_Telephone3" TEXT, "Address1_PostOfficeBox" TEXT, "IncomingEmailDeliveryMethod_Value" INTEGER, "optevia_LastUpdatedDateTime" TIMESTAMP, "Address1_StateOrProvince" TEXT, "detica_AdvisorsId_Id" UUID, "detica_AdvisorsId_LogicalName" TEXT, "detica_AdvisorsId_Name" TEXT, "DisplayInServiceViews" BOOLEAN, "TimeZoneRuleVersionNumber" INTEGER, "Address2_Fax" TEXT, "SystemUsercalendar_system_usersCalendar_CalendarId" UUID, "SystemUserterritory_system_usersTerritory_TerritoryId" UUID, "SystemUseroptevia_systemuser_Languageoptevia_language_optevia_languageId" UUID, "SystemUserdetica_detica_specialistdeliveryprovider_systemudetica_specialistdeliveryprovider_detica_specialistdeliveryproviderId" UUID, "SystemUserTransactionCurrency_SystemUserTransactionCurrency_TransactionCurrencyId" UUID, "SystemUserdetica_detica_omisorder_systemusersdetica_omisorder_detica_omisorderId" UUID, "SystemUserorganization_system_usersOrganization_OrganizationId" UUID, "SystemUserdetica_detica_omisorder_systemuser_Speicalistdetica_omisorder_detica_omisorderId" UUID, "SystemUserlk_systemuserbase_modifiedbySystemUser_SystemUserId" UUID, "SystemUsersite_system_usersSite_SiteId" UUID, "SystemUseroptevia_systemuser_UKRegionoptevia_ukregion_optevia_ukregionId" UUID, "SystemUseroptevia_advisor_nationalityoptevia_nationality_optevia_nationalityId" UUID, "SystemUseroptevia_optevia_country_systemuser_Countryoptevia_country_optevia_countryId" UUID, "SystemUserdetica_detica_omisorder_systemuserdetica_omisorder_detica_omisorderId" UUID, "SystemUserlk_systemuserbase_createdbySystemUser_SystemUserId" UUID, "SystemUseruser_parent_userSystemUser_SystemUserId" UUID, "SystemUseroptevia_advisor_genderoptevia_gender_optevia_genderId" UUID, "SystemUseroptevia_advisor_emailaddresstypeoptevia_emailaddresstype_optevia_emailaddresstypeId" UUID, "SystemUserqueue_system_userQueue_QueueId" UUID, "SystemUseroptevia_advisor_titleoptevia_title_optevia_titleId" UUID, "SystemUserlk_systemuser_modifiedonbehalfbySystemUser_SystemUserId" UUID, "SystemUseroptevia_advisor_addresstypeoptevia_addresstype_optevia_addresstypeId" UUID, "SystemUserlk_systemuser_createdonbehalfbySystemUser_SystemUserId" UUID, "SystemUserbusiness_unit_system_usersBusinessUnit_BusinessUnitId" UUID, "SystemUseroptevia_advisor_locationtypeoptevia_locationtype_optevia_locationtypeId" UUID, "SystemUseroptevia_advisor_telephoneoptevia_telephonetype_optevia_telephonetypeId" UUID, PRIMARY KEY ("SystemUserId"));
  ALTER TABLE "SystemUserSet" ADD CONSTRAINT "SystemUsercalendar_system_usersCalendar" FOREIGN KEY ("SystemUsercalendar_system_usersCalendar_CalendarId") REFERENCES "CalendarSet"("CalendarId"), ADD CONSTRAINT "SystemUserterritory_system_usersTerritory" FOREIGN KEY ("SystemUserterritory_system_usersTerritory_TerritoryId") REFERENCES "TerritorySet"("TerritoryId"), ADD CONSTRAINT "SystemUseroptevia_systemuser_Languageoptevia_language" FOREIGN KEY ("SystemUseroptevia_systemuser_Languageoptevia_language_optevia_languageId") REFERENCES "optevia_languageSet"("optevia_languageId"), ADD CONSTRAINT "SystemUserdetica_detica_specialistdeliveryprovider_systemudetica_specialistdeliveryprovider" FOREIGN KEY ("SystemUserdetica_detica_specialistdeliveryprovider_systemudetica_specialistdeliveryprovider_detica_specialistdeliveryproviderId") REFERENCES "detica_specialistdeliveryproviderSet"("detica_specialistdeliveryproviderId"), ADD CONSTRAINT "SystemUserTransactionCurrency_SystemUserTransactionCurrency" FOREIGN KEY ("SystemUserTransactionCurrency_SystemUserTransactionCurrency_TransactionCurrencyId") REFERENCES "TransactionCurrencySet"("TransactionCurrencyId"), ADD CONSTRAINT "SystemUserdetica_detica_omisorder_systemusersdetica_omisorder" FOREIGN KEY ("SystemUserdetica_detica_omisorder_systemusersdetica_omisorder_detica_omisorderId") REFERENCES "detica_omisorderSet"("detica_omisorderId"), ADD CONSTRAINT "SystemUserorganization_system_usersOrganization" FOREIGN KEY ("SystemUserorganization_system_usersOrganization_OrganizationId") REFERENCES "OrganizationSet"("OrganizationId"), ADD CONSTRAINT "SystemUserdetica_detica_omisorder_systemuser_Speicalistdetica_omisorder" FOREIGN KEY ("SystemUserdetica_detica_omisorder_systemuser_Speicalistdetica_omisorder_detica_omisorderId") REFERENCES "detica_omisorderSet"("detica_omisorderId"), ADD CONSTRAINT "SystemUserlk_systemuserbase_modifiedbySystemUser" FOREIGN KEY ("SystemUserlk_systemuserbase_modifiedbySystemUser_SystemUserId") REFERENCES "SystemUserSet"("SystemUserId"), ADD CONSTRAINT "SystemUsersite_system_usersSite" FOREIGN KEY ("SystemUsersite_system_usersSite_SiteId") REFERENCES "SiteSet"("SiteId"), ADD CONSTRAINT "SystemUseroptevia_systemuser_UKRegionoptevia_ukregion" FOREIGN KEY ("SystemUseroptevia_systemuser_UKRegionoptevia_ukregion_optevia_ukregionId") REFERENCES "optevia_ukregionSet"("optevia_ukregionId"), ADD CONSTRAINT "SystemUseroptevia_advisor_nationalityoptevia_nationality" FOREIGN KEY ("SystemUseroptevia_advisor_nationalityoptevia_nationality_optevia_nationalityId") REFERENCES "optevia_nationalitySet"("optevia_nationalityId"), ADD CONSTRAINT "SystemUseroptevia_optevia_country_systemuser_Countryoptevia_country" FOREIGN KEY ("SystemUseroptevia_optevia_country_systemuser_Countryoptevia_country_optevia_countryId") REFERENCES "optevia_countrySet"("optevia_countryId"), ADD CONSTRAINT "SystemUserdetica_detica_omisorder_systemuserdetica_omisorder" FOREIGN KEY ("SystemUserdetica_detica_omisorder_systemuserdetica_omisorder_detica_omisorderId") REFERENCES "detica_omisorderSet"("detica_omisorderId"), ADD CONSTRAINT "SystemUserlk_systemuserbase_createdbySystemUser" FOREIGN KEY ("SystemUserlk_systemuserbase_createdbySystemUser_SystemUserId") REFERENCES "SystemUserSet"("SystemUserId"), ADD CONSTRAINT "SystemUseruser_parent_userSystemUser" FOREIGN KEY ("SystemUseruser_parent_userSystemUser_SystemUserId") REFERENCES "SystemUserSet"("SystemUserId"), ADD CONSTRAINT "SystemUseroptevia_advisor_genderoptevia_gender" FOREIGN KEY ("SystemUseroptevia_advisor_genderoptevia_gender_optevia_genderId") REFERENCES "optevia_genderSet"("optevia_genderId"), ADD CONSTRAINT "SystemUseroptevia_advisor_emailaddresstypeoptevia_emailaddresstype" FOREIGN KEY ("SystemUseroptevia_advisor_emailaddresstypeoptevia_emailaddresstype_optevia_emailaddresstypeId") REFERENCES "optevia_emailaddresstypeSet"("optevia_emailaddresstypeId"), ADD CONSTRAINT "SystemUserqueue_system_userQueue" FOREIGN KEY ("SystemUserqueue_system_userQueue_QueueId") REFERENCES "QueueSet"("QueueId"), ADD CONSTRAINT "SystemUseroptevia_advisor_titleoptevia_title" FOREIGN KEY ("SystemUseroptevia_advisor_titleoptevia_title_optevia_titleId") REFERENCES "optevia_titleSet"("optevia_titleId"), ADD CONSTRAINT "SystemUserlk_systemuser_modifiedonbehalfbySystemUser" FOREIGN KEY ("SystemUserlk_systemuser_modifiedonbehalfbySystemUser_SystemUserId") REFERENCES "SystemUserSet"("SystemUserId"), ADD CONSTRAINT "SystemUseroptevia_advisor_addresstypeoptevia_addresstype" FOREIGN KEY ("SystemUseroptevia_advisor_addresstypeoptevia_addresstype_optevia_addresstypeId") REFERENCES "optevia_addresstypeSet"("optevia_addresstypeId"), ADD CONSTRAINT "SystemUserlk_systemuser_createdonbehalfbySystemUser" FOREIGN KEY ("SystemUserlk_systemuser_createdonbehalfbySystemUser_SystemUserId") REFERENCES "SystemUserSet"("SystemUserId"), ADD CONSTRAINT "SystemUserbusiness_unit_system_usersBusinessUnit" FOREIGN KEY ("SystemUserbusiness_unit_system_usersBusinessUnit_BusinessUnitId") REFERENCES "BusinessUnitSet"("BusinessUnitId"), ADD CONSTRAINT "SystemUseroptevia_advisor_locationtypeoptevia_locationtype" FOREIGN KEY ("SystemUseroptevia_advisor_locationtypeoptevia_locationtype_optevia_locationtypeId") REFERENCES "optevia_locationtypeSet"("optevia_locationtypeId"), ADD CONSTRAINT "SystemUseroptevia_advisor_telephoneoptevia_telephonetype" FOREIGN KEY ("SystemUseroptevia_advisor_telephoneoptevia_telephonetype_optevia_telephonetypeId") REFERENCES "optevia_telephonetypeSet"("optevia_telephonetypeId");
  