text: CREATE TABLE [dbo].[PIMS_INSURANCE_HIST] (
      [_INSURANCE_HIST_ID] BIGINT CONSTRAINT [DF__PIMS_INSU___INSU__1F247CCC] DEFAULT NEXT VALUE FOR [PIMS_INSURANCE_H_ID_SEQ] NOT NULL,
      [EFFECTIVE_DATE_HIST] DATETIME CONSTRAINT [DF__PIMS_INSU__EFFEC__2018A105] DEFAULT getutcdate() NOT NULL,
      [END_DATE_HIST] DATETIME,
      [INSURANCE_ID] BIGINT NOT NULL,
      [LEASE_ID] BIGINT NOT NULL,
      [INSURANCE_TYPE_CODE] NVARCHAR(20) NOT NULL,
      [INSURER_ORG_ID] BIGINT NOT NULL,
      [INSURER_CONTACT_ID] BIGINT NOT NULL,
      [MOTI_RISK_MGMT_CONTACT_ID] BIGINT NOT NULL,
      [BCTFA_RISK_MGMT_CONTACT_ID] BIGINT NOT NULL,
      [INSURANCE_PAYEE_TYPE_CODE] NVARCHAR(20) NOT NULL,
      [OTHER_INSURANCE_TYPE] NVARCHAR(200),
      [COVERAGE_DESCRIPTION] NVARCHAR(2000),
      [COVERAGE_LIMIT] MONEY NOT NULL,
      [INSURED_VALUE] MONEY NOT NULL,
      [START_DATE] DATE NOT NULL,
      [EXPIRY_DATE] DATE NOT NULL,
      [RISK_ASSESSMENT_COMPLETED_DATE] DATETIME,
      [CONCURRENCY_CONTROL_NUMBER] BIGINT NOT NULL,
      [APP_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_CREATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_CREATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_LAST_UPDATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [DB_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [DB_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      CONSTRAINT [PIMS_INSRNC_H_PK] PRIMARY KEY CLUSTERED ([_INSURANCE_HIST_ID]),
      CONSTRAINT [PIMS_INSRNC_H_UK] UNIQUE ([_INSURANCE_HIST_ID], [END_DATE_HIST])
  )
  GO
  
  /* ---------------------------------------------------------------------- */
  /* Add table "dbo.PIMS_SECURITY_DEPOSIT_HIST"                             */
  /* ---------------------------------------------------------------------- */
  
  CREATE TABLE [dbo].[PIMS_SECURITY_DEPOSIT_HIST] (
      [_SECURITY_DEPOSIT_HIST_ID] BIGINT CONSTRAINT [DF__PIMS_SECU___SECU__2E31B632] DEFAULT NEXT VALUE FOR [PIMS_SECURITY_DEPOSIT_H_ID_SEQ] NOT NULL,
      [EFFECTIVE_DATE_HIST] DATETIME CONSTRAINT [DF__PIMS_SECU__EFFEC__2F25DA6B] DEFAULT getutcdate() NOT NULL,
      [END_DATE_HIST] DATETIME,
      [SECURITY_DEPOSIT_ID] BIGINT NOT NULL,
      [LEASE_ID] BIGINT NOT NULL,
      [SEC_DEP_HOLDER_TYPE_CODE] NVARCHAR(20) NOT NULL,
      [SECURITY_DEPOSIT_TYPE_CODE] NVARCHAR(20) NOT NULL,
      [DESCRIPTION] NVARCHAR(2000) NOT NULL,
      [AMOUNT_PAID] MONEY NOT NULL,
      [TOTAL_AMOUNT] MONEY NOT NULL,
      [DEPOSIT_DATE] DATE NOT NULL,
      [ANNUAL_INTEREST_RATE] NUMERIC(18),
      [CONCURRENCY_CONTROL_NUMBER] BIGINT NOT NULL,
      [APP_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_CREATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_CREATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_LAST_UPDATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [DB_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [DB_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      CONSTRAINT [PIMS_SECDEP_H_PK] PRIMARY KEY CLUSTERED ([_SECURITY_DEPOSIT_HIST_ID]),
      CONSTRAINT [PIMS_SECDEP_H_UK] UNIQUE ([_SECURITY_DEPOSIT_HIST_ID], [END_DATE_HIST])
  )
  GO
  
  
  /* ---------------------------------------------------------------------- */
  /* Add table "dbo.PIMS_SECURITY_DEPOSIT_RETURN_HIST"                      */
  /* ---------------------------------------------------------------------- */
  
  CREATE TABLE [dbo].[PIMS_SECURITY_DEPOSIT_RETURN_HIST] (
      [_SECURITY_DEPOSIT_RETURN_HIST_ID] BIGINT CONSTRAINT [DF__PIMS_SECU___SECU__33EA8F88] DEFAULT NEXT VALUE FOR [PIMS_SECURITY_DEPOSIT_RETURN_H_ID_SEQ] NOT NULL,
      [EFFECTIVE_DATE_HIST] DATETIME CONSTRAINT [DF__PIMS_SECU__EFFEC__34DEB3C1] DEFAULT getutcdate() NOT NULL,
      [END_DATE_HIST] DATETIME,
      [SECURITY_DEPOSIT_RETURN_ID] BIGINT NOT NULL,
      [LEASE_ID] BIGINT NOT NULL,
      [SECURITY_DEPOSIT_TYPE_CODE] NVARCHAR(20) NOT NULL,
      [TERMINATION_DATE] DATETIME NOT NULL,
      [DEPOSIT_TOTAL] MONEY NOT NULL,
      [CLAIMS_AGAINST] MONEY,
      [RETURN_AMOUNT] MONEY NOT NULL,
      [RETURN_DATE] DATETIME NOT NULL,
      [CHEQUE_NUMBER] NVARCHAR(50) NOT NULL,
      [PAYEE_NAME] NVARCHAR(100) NOT NULL,
      [PAYEE_ADDRESS] NVARCHAR(500) NOT NULL,
      [TERMINATION_NOTE] NVARCHAR(4000),
      [CONCURRENCY_CONTROL_NUMBER] BIGINT NOT NULL,
      [APP_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_CREATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_CREATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [APP_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      [APP_LAST_UPDATE_USER_GUID] UNIQUEIDENTIFIER,
      [APP_LAST_UPDATE_USER_DIRECTORY] NVARCHAR(30) NOT NULL,
      [DB_CREATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_CREATE_USERID] NVARCHAR(30) NOT NULL,
      [DB_LAST_UPDATE_TIMESTAMP] DATETIME NOT NULL,
      [DB_LAST_UPDATE_USERID] NVARCHAR(30) NOT NULL,
      CONSTRAINT [PIMS_SDRTRN_H_PK] PRIMARY KEY CLUSTERED ([_SECURITY_DEPOSIT_RETURN_HIST_ID]),
      CONSTRAINT [PIMS_SDRTRN_H_UK] UNIQUE ([_SECURITY_DEPOSIT_RETURN_HIST_ID], [END_DATE_HIST])
  )
  GO
  