text: CREATE SCHEMA IF NOT EXISTS dbo; 
  
  create table dbo."r20Elector" ( 
        "Id" int PRIMARY KEY,
        "IdMy" int NULL,
        "sysCreated" timestamp NULL,
        "sysChanged" timestamp NULL,
        "sysDeleted" timestamp NULL,
        "ElectorNoPrefix" varchar(10) NULL,
        "ElectorNo" int NULL,
        "ElectorNoSuffix" int NULL,
        "ElectorLastNo" varchar(15) NULL,
        "ElectorForename" varchar(50) NULL,
        "ElectorSurname" varchar(50) NULL,
        "ElectorTitle" varchar(30) NULL,
        "ElectorNationality" varchar(20) NULL,
        "ElectorDOB" timestamp NULL,
        "ElectorNotes" varchar(255) NULL,
        "ElectorDeceased" boolean NULL,
        "MarkerNew" boolean NULL,
        "MarkerYoung" boolean NULL,
        "MarkerOver70" boolean NULL,
        "MarkerHolder" boolean NULL,
        "MarkerCrown" boolean NULL,
        "MarkerLord" boolean NULL,
        "MarkerService" boolean NULL,
        "MarkerEuroL" boolean NULL,
        "MarkerEuroLE" boolean NULL,
        "MarkerEuroE" boolean NULL,
        "MarkerVoluntary" boolean NULL,
        "MarkerSupp" boolean NULL,
        "MarkerPostal" boolean NULL,
        "MarkerProxy" boolean NULL,
        "MarkerOverseas" boolean NULL,
        "MarkerOverseasL" boolean NULL,
        "ServiceNumber" varchar(15) NULL,
        "ServiceCategory" varchar(10) NULL,
        "SuppMonth" int NULL,
        "PostProxName" varchar(50) NULL,
        "PostProxAddress1" varchar(50) NULL,
        "PostProxAddress2" varchar(50) NULL,
        "PostProxAddress3" varchar(50) NULL,
        "PostProxAddress4" varchar(50) NULL,
        "PostProxAddress5" varchar(50) NULL,
        "PostProxPostCode" varchar(8) NULL,
        "PostProxType" varchar(5) NULL,
        "PostProxRPF7Date" timestamp NULL,
        "PostProxRPF9Date" timestamp NULL,
        "CorrespAddress1" varchar(50) NULL,
        "CorrespAddress2" varchar(50) NULL,
        "CorrespAddress3" varchar(50) NULL,
        "CorrespAddress4" varchar(50) NULL,
        "CorrespAddress5" varchar(50) NULL,
        "CorrespPostCode" varchar(8) NULL,
        "QualifyAddress1" varchar(50) NULL,
        "QualifyAddress2" varchar(50) NULL,
        "QualifyAddress3" varchar(50) NULL,
        "QualifyAddress4" varchar(50) NULL,
        "QualifyAddress5" varchar(50) NULL,
        "QualifyPostCode" varchar(8) NULL,
        "QualifyResidence" varchar(4) NULL,
        "sysOrder" int NULL,
        "sysPollingDistrictId" int NULL,
        "sysStreetId" int NULL,
        "sysSubStreetId" int NULL,
        "sysPropertyId" int NULL,
        "sysOEPollingDistrictId" int NULL,
        "sysCreatedMnth" int NULL,
        "sysChangedMnth" int NULL,
        "sysDeletedMnth" int NULL,
        "sysCreatedUserId" varchar(20) NULL,
        "sysChangedUserId" varchar(20) NULL,
        "sysDeletedUserId" varchar(20) NULL,
        "DeclarationExpire" timestamp NULL,
        "MarkerOmitEditReg" int NULL,
        "PrevAddress1" varchar(50) NULL,
        "PrevAddress2" varchar(50) NULL,
        "PrevAddress3" varchar(50) NULL,
        "PrevAddress4" varchar(50) NULL,
        "PrevAddress5" varchar(50) NULL,
        "PrevPostCode" varchar(8) NULL,
        "sysRegAuthorityId" int NULL,
        "AbsentDestination" int NULL,
        "ElectorClass" varchar(1) NULL,
        "ElectorEmail" varchar(255) NULL,
        "ElectorExecptSalutation" varchar(255) NULL,
        "AbsentRequestType" varchar(5) NULL,
        "AbsentRequestSent" timestamp NULL,
        "ElectorURN" varchar(25) NULL,
        "sysElectorImage" int NULL,
        "PrevElectorTitle" varchar(30) NULL,
        "PrevElectorForename" varchar(50) NULL,
        "PrevElectorSurname" varchar(50) NULL,
        "MarkerHomeless" int NULL,
        "MarkerRemand" int NULL,
        "MarkerRising70" int NULL
  );
  
  create table dbo."r20ElectorExtension" (
  	  "Id" int PRIMARY KEY NOT NULL,
        "sysCreated" timestamp NULL,
        "sysCreatedUserId" varchar(20) NULL,
        "Accepted" boolean NULL,
        "DOB" timestamp NULL,
        "NINO" varchar(50) NULL,
        "NINOPassword" varchar(512) NOT NULL,
        "NINOCaptureDate" timestamp NULL,
        "ITRStatusID" int NULL,
        "ITRSourceID" int NOT NULL,
        "MiddleName" varchar(200) NULL,
        "RAG" varchar(1) NOT NULL,
        "RejectReason" varchar(500) NULL,
        "CPNStatusID" int NULL,
        "WaitingResponse" boolean NULL,
        "PropertyVerified" boolean NULL,
        "IsHolding" boolean NULL,
        "NearestMatchingElector" int NULL,
        "IsNearestInHolding" boolean NULL,
        "NearestMatcingCriteria" varchar(2048) NULL,
        "NearestMatchingValue" decimal(18,0) NULL,
        "PrevMatchingElector" int NULL, 
        "IsPrevInHolding" boolean NULL,
        "PrevMatcingCriteria" varchar(2048) NULL,
        "PrevMatchingValue" decimal(18,0) NULL,
        "ElectorTelephone" varchar(30) NULL,
        "IERInfoSignedDate" timestamp NULL,
        "RemainAtOldAddressReason" int NULL,
        "NoDOBReason" int NULL,
        "NoNINOReason" int NULL,
        "PrevMiddleName" varchar(200) NULL,
        "ApplicationMethod" int NULL,
        "sysTIMESTAMP" timestamp NULL,
        "sysElectorLiveDate" timestamp NULL,
        "EvidenceStatus" int NULL,
        "EvidenceType1" int NULL,
        "EvidenceType2" int NULL,
        "EvidenceType3" int NULL,
        "AttestorId" int NULL,
        "DeletedReason1" int NULL,
        "DeletedReason2" int NULL, 
        "sysERTP_IER_Log_Id_Last" bigint NULL,
        "ProposedForename" varchar(50) NULL,
        "ProposedSurname" varchar(50) NULL,
        "ProposedMiddleName" varchar(200) NULL,
        "NoNationalityReason" int NULL,
        "ERTPMatchStatusArray" varchar(20) NULL,
        "ElectorTelephoneSMS" varchar(30) NULL,
        "NameChangeEvidence" int NULL,
        "AttestorName" varchar(70) NULL,
        "AttestedDate" timestamp NULL,
        "sysERTP_IER_Log_Id_LastInvalidData" bigint NULL,
        "PrevAddressUPRN" varchar(20) NULL,
        "sysImportHeaderId" int NULL,
        "ProposedCancelAV" int NULL,
        "RequestOptOut" int NULL,
        "MoverSent" int NULL,
        "MoverSentLast" timestamp NULL,
        "EPSource" int NULL,
        "PrevMatchByPostCode" int NULL,
        "PrevElectorNOTFound" int NULL,
        "VerifiedAtGDS" timestamp NULL,
        "RejectReason1" int NULL,
        "ServiceCrownSpouse" int NULL,
        "AutoMergeLast" timestamp NULL,
        "AutoMergeFromLast" timestamp NULL,
        "OpenRegEffective" timestamp NULL,
        "VoterRole" varchar(100) NULL,
        "NameChangeEvidenceNOTe" varchar(100) NULL,
        "ProposedNationality" varchar(20) NULL,
        "MarkerWasOver70" int NULL,
        "MarkerSingleOccupant" int NULL,
        "EmailBounceBackDate" timestamp NULL,
        "SuitableEvidenceDate" timestamp NULL,
        "DeceasedEvidenceFullname" varchar(255) NULL,
        "DeceasedEvidenceAddress" varchar(1000) NULL,
        "DeceasedEvidenceAcknowledgement" boolean NOT NULL,
        "UnsubscribeEmail" boolean NOT NULL
  );
  
  create table dbo."r20Property" (
        "Id" int PRIMARY KEY NOT NULL,
        "IdMy" int null, 
        "sysCreated" timestamp null,
        "sysChanged" timestamp null,
        "sysDeleted" timestamp null,
        "PropertyName" varchar(5) null,
        "PropertyNumber" int null,
        "PropertyPrefix" varchar(10) null,
        "PropertySuffix" varchar(10) null,
        "PropertyPostCode" varchar(8) null,
        "PropertyAddress1" varchar(50) null,
        "PropertyAddress2" varchar(50) null,
        "PropertyAddress3" varchar(50) null,
        "PropertyTelNumber" varchar(20) null,
        "PropertyClass" varchar(5) null,
        "PropertyURN" varchar(25) null,
        "PropertyEasting" int null,
        "PropertyNorthing" int null,
        "PropertyNotes" varchar(255) null,
        "PropertyWalksort" varchar(8) null,
        "sysAFormReceived" timestamp null,
        "sysAFormChanged" boolean null,
        "sysAFormNonResponder" int null,
        "sysAFormScanNo" int null,
        "sysAFormImageFile" varchar(12) null,
        "sysPropertySort" varchar(15) null,
        "sysOrder" int null,
        "sysPollingDistrictId" int null,
        "sysStreetId" int null,
        "sysSubStreetId" int null,
        "sysElectorCount" int null,
        "PropertyNamePrefix" varchar(50) null,
        "PropertyNameNumber" int null,
        "PropertyNameSuffix" varchar(50) null,
        "sysManOrder" int null, 
        "PropertyEMail" varchar(255) null,
        "sysNewElectorCount" int null,
        "sysCreatedUserId" varchar(20) null,
        "sysDeletedUserId" varchar(20) null,
        "sysChangedUserId" varchar(20) null,
        "sysCanvassAreaId" int null
  );
  