Guest User

Untitled

a guest
Nov 25th, 2017
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. USE [ABC]
  2. GO
  3. /****** Object: Table [dbo].[Assets] Script Date: 11/25/2017 4:54:20 PM ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. SET ANSI_PADDING ON
  9. GO
  10. CREATE TABLE [dbo].[Assets](
  11. [AssetID] [int] IDENTITY(1,1) NOT NULL,
  12. [Name] [varchar](50) NULL,
  13. [PropertyTypeID] [int] NOT NULL,
  14. [Address1] [varchar](100) NULL,
  15. [Address2] [varchar](100) NULL,
  16. [CityId] [int] NULL,
  17. [Zip] [varchar](15) NULL,
  18. [YearBuilt] [int] NULL,
  19. [PropertySize] [int] NULL,
  20. [PropertyUnitType] [smallint] NULL,
  21. [Latitude] [numeric](10, 7) NULL,
  22. [Longitude] [numeric](10, 7) NULL,
  23. [IsGeocodeSuccess] [smallint] NOT NULL,
  24. [Precision] [smallint] NULL,
  25. [CreatedBy] [int] NULL,
  26. [DateCreated] [datetime] NOT NULL,
  27. [ModifiedBy] [int] NULL,
  28. [DateModified] [datetime] NULL,
  29. [RemovedBy] [int] NULL,
  30. [DateRemoved] [datetime] NULL,
  31. [FromDealPropertyID] [int] NULL,
  32. [GeoCodeLastAttempt] [datetime] NULL,
  33. [CreatedByNGJobID] [bigint] NULL,
  34. [LandAreaInAcres] [decimal](18, 8) NULL,
  35. [NumberofFloors] [varchar](50) NULL,
  36. [ModifiedByNGJobID] [bigint] NULL,
  37. [NumberofBuildings] [int] NULL,
  38. [RCAPropertyID] [bigint] NULL,
  39. [OutputCategory] [int] NULL,
  40. [PropertySubType] [int] NULL,
  41. [RCAPropertyUpdate] [datetime] NULL,
  42. [YearRenovated] [int] NULL,
  43. [Size_Sqft] [decimal](18, 8) NULL,
  44. [Size_Units] [int] NULL,
  45. [Size_Acres] [decimal](18, 8) NULL,
  46. [AlternateAssetID] [int] NULL,
  47. [TenantIDs] [varchar](300) NULL,
  48. [TenantNames] [varchar](500) NULL,
  49. [Size_InLineSqft] [decimal](18, 8) NULL,
  50. [TenancyID] [int] NULL,
  51. [IsPortfolio] [bit] NOT NULL,
  52. [PortfolioCount] [int] NULL,
  53. [GooglePrecision] [smallint] NULL,
  54. CONSTRAINT [PK_Properties] PRIMARY KEY CLUSTERED
  55. (
  56. [AssetID] ASC
  57. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  58. ) ON [PRIMARY]
  59.  
  60. GO
  61. SET ANSI_PADDING OFF
  62. GO
  63. /****** Object: Table [dbo].[CacheClients] Script Date: 11/25/2017 4:54:20 PM ******/
  64. SET ANSI_NULLS ON
  65. GO
  66. SET QUOTED_IDENTIFIER ON
  67. GO
  68. SET ANSI_PADDING ON
  69. GO
  70. CREATE TABLE [dbo].[CacheClients](
  71. [ClientID] [int] NOT NULL,
  72. [ClientName] [varchar](255) NOT NULL,
  73. [OldClientName] [varchar](100) NULL,
  74. [PreMergerClientID] [int] NULL,
  75. [PreMergerClientName] [varchar](100) NULL,
  76. [MappingCode] [smallint] NULL,
  77. [DateMapped] [datetime] NULL,
  78. [CurrentClientID] [int] NOT NULL,
  79. [NewClientID] [int] NULL,
  80. [InvestorTypeID] [int] NULL,
  81. [ParentClientID] [int] NULL,
  82. [ParentClientName] [varchar](100) NULL,
  83. [Address1] [varchar](255) NULL,
  84. [Address2] [varchar](100) NULL,
  85. [Address3] [varchar](100) NULL,
  86. [Phone] [varchar](40) NULL,
  87. [Fax] [varchar](40) NULL,
  88. [Description] [varchar](max) NULL,
  89. [CityID] [int] NULL,
  90. [isCMBS] [bit] NOT NULL,
  91. [isNationalAccount] [bit] NOT NULL,
  92. [isInvestorCorrespondent] [bit] NOT NULL,
  93. [isInvestorServicing] [bit] NOT NULL,
  94. [isUmbrella] [bit] NOT NULL,
  95. [isForeign] [bit] NOT NULL,
  96. [isSearchable] [bit] NOT NULL,
  97. [isDeleted] [bit] NOT NULL,
  98. [CurrentClientIsDeleted] [bit] NOT NULL,
  99. [DateRemoved] [datetime] NULL,
  100. [InvestorServicePortfolio] [money] NULL,
  101. [URL] [varchar](255) NULL,
  102. [ModifiedBy] [int] NULL,
  103. [DateModified] [datetime] NULL,
  104. [LastBookUpdated] [int] NULL,
  105. [Zip] [varchar](20) NULL,
  106. [NAType] [int] NULL,
  107. [Books] [int] NOT NULL,
  108. [ThirdPartyCategoryID] [int] NULL,
  109. [CreatedBy] [int] NULL,
  110. [DateCreated] [datetime] NULL,
  111. [ApprovedBy] [int] NULL,
  112. [DateApproved] [datetime] NULL,
  113. [CreatedSourceID] [int] NULL,
  114. [CreatedByNGJobID] [bigint] NULL,
  115. [ContactCount] [int] NULL,
  116. [ActivityCount] [int] NULL,
  117. [OnDealsAsClient] [int] NULL,
  118. [OnDealsAsInvestor] [int] NULL,
  119. [Advocates] [varchar](500) NULL,
  120. [SourcesOfFunds] [varchar](max) NULL,
  121. [Accounts] [varchar](max) NULL,
  122. [Advisors] [varchar](max) NULL,
  123. [QuoteCount] [int] NULL,
  124. [PackageCount] [int] NULL,
  125. [BlastCount] [int] NULL,
  126. [IsFreddieMac] [bit] NOT NULL,
  127. [HFFWarehouseLOC] [money] NOT NULL,
  128. [SourceOfFundRegion] [varchar](max) NULL,
  129. [SalesForceID] [nchar](20) NULL,
  130. [CACount] [int] NULL,
  131. [TourCount] [int] NULL,
  132. CONSTRAINT [PK_CacheClients] PRIMARY KEY CLUSTERED
  133. (
  134. [ClientID] ASC
  135. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  136. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  137.  
  138. GO
  139. SET ANSI_PADDING OFF
  140. GO
  141. /****** Object: Table [dbo].[Cities] Script Date: 11/25/2017 4:54:20 PM ******/
  142. SET ANSI_NULLS ON
  143. GO
  144. SET QUOTED_IDENTIFIER ON
  145. GO
  146. SET ANSI_PADDING ON
  147. GO
  148. CREATE TABLE [dbo].[Cities](
  149. [CityID] [int] IDENTITY(1,1) NOT NULL,
  150. [City] [nvarchar](200) NULL,
  151. [State] [nvarchar](200) NOT NULL,
  152. [Country] [varchar](50) NULL,
  153. [RegionID] [int] NULL,
  154. [StateID] [int] NULL,
  155. [isDeleted] [bit] NOT NULL,
  156. [isDisplay] [bit] NOT NULL,
  157. [CountryID] [int] NULL,
  158. [RegionIDOld] [int] NULL,
  159. [IsOriginal] [bit] NULL,
  160. [Latitude] [numeric](10, 7) NULL,
  161. [Longitude] [numeric](10, 7) NULL,
  162. [MarketTypeID] [int] NULL,
  163. [IsGateway] [bit] NOT NULL,
  164. [RCARegionID] [int] NULL,
  165. [HasMSAOverride] [bit] NOT NULL,
  166. [RegionID092013] [int] NULL,
  167. CONSTRAINT [PK_Cities] PRIMARY KEY CLUSTERED
  168. (
  169. [CityID] ASC
  170. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  171. ) ON [PRIMARY]
  172.  
  173. GO
  174. SET ANSI_PADDING OFF
  175. GO
  176. /****** Object: Table [dbo].[DealFinancingMethods] Script Date: 11/25/2017 4:54:20 PM ******/
  177. SET ANSI_NULLS ON
  178. GO
  179. SET QUOTED_IDENTIFIER ON
  180. GO
  181. SET ANSI_PADDING ON
  182. GO
  183. CREATE TABLE [dbo].[DealFinancingMethods](
  184. [DealFinancingMethodsID] [int] IDENTITY(1,1) NOT NULL,
  185. [FinancingMethod] [varchar](255) NOT NULL,
  186. [DateRemoved] [datetime] NULL,
  187. [RemovedBy] [int] NULL,
  188. CONSTRAINT [PK_DealFinancingMethods] PRIMARY KEY CLUSTERED
  189. (
  190. [DealFinancingMethodsID] ASC
  191. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  192. ) ON [PRIMARY]
  193.  
  194. GO
  195. SET ANSI_PADDING OFF
  196. GO
  197. /****** Object: Table [dbo].[DealPlatforms] Script Date: 11/25/2017 4:54:20 PM ******/
  198. SET ANSI_NULLS ON
  199. GO
  200. SET QUOTED_IDENTIFIER ON
  201. GO
  202. SET ANSI_PADDING ON
  203. GO
  204. CREATE TABLE [dbo].[DealPlatforms](
  205. [PlatformID] [int] NOT NULL,
  206. [Platform] [varchar](50) NOT NULL,
  207. [ShortName] [varchar](15) NULL,
  208. [DisplayOrder] [int] NOT NULL,
  209. [DepartmentID] [int] NULL,
  210. [NotesKeyName] [varchar](50) NULL,
  211. [DisplayWithOffice] [bit] NOT NULL,
  212. [BookName] [varchar](50) NULL,
  213. [IsDebt] [bit] NOT NULL,
  214. CONSTRAINT [PK_Platforms] PRIMARY KEY CLUSTERED
  215. (
  216. [PlatformID] ASC
  217. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  218. ) ON [PRIMARY]
  219.  
  220. GO
  221. SET ANSI_PADDING OFF
  222. GO
  223. /****** Object: Table [dbo].[DealProperties] Script Date: 11/25/2017 4:54:20 PM ******/
  224. SET ANSI_NULLS ON
  225. GO
  226. SET QUOTED_IDENTIFIER ON
  227. GO
  228. SET ANSI_PADDING ON
  229. GO
  230. CREATE TABLE [dbo].[DealProperties](
  231. [PropertyID] [int] IDENTITY(1,1) NOT NULL,
  232. [Name] [varchar](50) NULL,
  233. [DealID] [int] NULL,
  234. [PropertyTypeID] [int] NOT NULL,
  235. [OriginalAddress1] [varchar](100) NULL,
  236. [OriginalAddress2] [varchar](100) NULL,
  237. [OriginalCityId] [int] NULL,
  238. [OriginalZip] [varchar](15) NULL,
  239. [OriginalYearBuilt] [int] NULL,
  240. [PropertyProfileID] [int] NULL,
  241. [HasSingleTenant] [bit] NULL,
  242. [OriginalPropertySize] [int] NULL,
  243. [OriginalPropertyUnitType] [smallint] NULL,
  244. [Occupancy] [decimal](10, 0) NULL,
  245. [IsPriced] [smallint] NULL,
  246. [OriginalLatitude] [numeric](10, 7) NULL,
  247. [OriginalLongitude] [numeric](10, 7) NULL,
  248. [OriginalIsGeocodeSuccess] [smallint] NOT NULL,
  249. [IsFinancedByHFF] [bit] NULL,
  250. [OriginalPrecision] [smallint] NULL,
  251. [CreatedBy] [int] NULL,
  252. [DateCreated] [datetime] NOT NULL,
  253. [ModifiedBy] [int] NULL,
  254. [DateModified] [datetime] NULL,
  255. [RemovedBy] [int] NULL,
  256. [DateRemoved] [datetime] NULL,
  257. [DisplayInPropertyListing] [bit] NOT NULL,
  258. [PropertyListingName] [varchar](50) NULL,
  259. [PropertyListingLocDesc] [varchar](2000) NULL,
  260. [PropertyListingPropOv] [varchar](4000) NULL,
  261. [PropertyListingPropDesc] [varchar](2000) NULL,
  262. [Amount] [money] NULL,
  263. [IsMainProperty] [bit] NOT NULL,
  264. [CashOnCash] [decimal](8, 4) NULL,
  265. [IRR] [decimal](8, 4) NULL,
  266. [ROC] [decimal](8, 4) NULL,
  267. [ROI] [decimal](8, 4) NULL,
  268. [AvgROC] [decimal](8, 4) NULL,
  269. [AvgROI] [decimal](8, 4) NULL,
  270. [CalculatedIRR] [money] NULL,
  271. [BestInitialBid] [money] NULL,
  272. [Financing] [smallint] NULL,
  273. [LTV] [decimal](5, 4) NULL,
  274. [ExcludeISV] [bit] NOT NULL,
  275. [OriginalGeoCodeLastAttempt] [datetime] NULL,
  276. [UseGoogleMapSm] [bit] NOT NULL,
  277. [UseGoogleMapMed] [bit] NOT NULL,
  278. [GoogleMapSmZoom] [smallint] NULL,
  279. [GoogleMapMedZoom] [smallint] NULL,
  280. [AssetID] [int] NULL,
  281. [RentsInPlaceID] [int] NULL,
  282. [InPlaceNOI] [decimal](15, 4) NULL,
  283. [StabilizedNOI] [decimal](15, 4) NULL,
  284. [GoingInCapRate] [decimal](8, 4) NULL,
  285. [YearOneCapRate] [decimal](8, 4) NULL,
  286. [StabCapRate] [decimal](8, 4) NULL,
  287. [InPlaceCapRateWorksheet] [decimal](8, 4) NULL,
  288. [YearOneCapRateWorksheet] [decimal](8, 4) NULL,
  289. [StabilizedCapRateWorksheet] [decimal](8, 4) NULL,
  290. [FiveYearAvgROI] [decimal](12, 4) NULL,
  291. [FiveYearAvgROC] [decimal](12, 4) NULL,
  292. [TenYearAvgROI] [decimal](12, 4) NULL,
  293. [TenYearAvgROC] [decimal](12, 4) NULL,
  294. [UseManualFinancials] [bit] NULL,
  295. [LIRR] [decimal](8, 4) NULL,
  296. [WALE] [decimal](4, 1) NULL,
  297. CONSTRAINT [PK_DealProperties] PRIMARY KEY CLUSTERED
  298. (
  299. [PropertyID] ASC
  300. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  301. ) ON [PRIMARY]
  302.  
  303. GO
  304. SET ANSI_PADDING OFF
  305. GO
  306. /****** Object: Table [dbo].[Deals] Script Date: 11/25/2017 4:54:20 PM ******/
  307. SET ANSI_NULLS ON
  308. GO
  309. SET QUOTED_IDENTIFIER ON
  310. GO
  311. SET ANSI_PADDING ON
  312. GO
  313. CREATE TABLE [dbo].[Deals](
  314. [DealID] [int] IDENTITY(30000,1) NOT NULL,
  315. [DealName] [varchar](50) NOT NULL,
  316. [Description] [varchar](2000) NULL,
  317. [StageID] [int] NOT NULL,
  318. [Amount] [money] NOT NULL,
  319. [OfficeID] [int] NULL,
  320. [DepartmentID] [int] NULL,
  321. [DealTypeID] [int] NULL,
  322. [DateFeeExpected] [datetime] NULL,
  323. [DateClosed] [datetime] NULL,
  324. [AccountingDate] [datetime] NULL,
  325. [MaturityDate] [datetime] NULL,
  326. [isSecuritized] [bit] NULL,
  327. [isServiced] [bit] NULL,
  328. [isBoardedByServicing] [bit] NULL,
  329. [isRollover] [bit] NULL,
  330. [isExclusive] [bit] NULL,
  331. [MarketBudget] [money] NULL,
  332. [HFFTotalFee] [money] NULL,
  333. [FeeAgreeTypeID] [int] NULL,
  334. [DateCommitmentExpires] [datetime] NULL,
  335. [LenderLegalFees] [money] NULL,
  336. [StartDate] [datetime] NULL,
  337. [ExitStrategyID] [int] NULL,
  338. [PublicityID] [int] NULL,
  339. [DateOpenToPrepay] [datetime] NULL,
  340. [ClosingRate] [numeric](6, 3) NULL,
  341. [AccessDealID] [int] NULL,
  342. [isDeleted] [smallint] NOT NULL,
  343. [LinkedDealID] [int] NULL,
  344. [RFPProposalDate] [datetime] NULL,
  345. [RFPStatus] [smallint] NULL,
  346. [RFPListPrice] [money] NULL,
  347. [RFPBOV] [money] NULL,
  348. [RFPCompetition] [nvarchar](max) NULL,
  349. [RFPComments] [nvarchar](max) NULL,
  350. [AcceptanceDate] [datetime] NULL,
  351. [DateCreated] [datetime] NULL,
  352. [CreatedBy] [int] NULL,
  353. [CommitmentAccepted] [varchar](100) NULL,
  354. [FeesApprovedBy] [int] NULL,
  355. [DateFeesApproved] [datetime] NULL,
  356. [FinancialsOld] [varchar](150) NULL,
  357. [FinancialComments] [varchar](1000) NULL,
  358. [DateModified] [datetime] NULL,
  359. [ModifiedBy] [int] NULL,
  360. [DateRemoved] [datetime] NULL,
  361. [FeeComments] [varchar](500) NULL,
  362. [isFeeGrandFathered] [bit] NOT NULL,
  363. [OrigContractAmt] [money] NULL,
  364. [MarketingDate] [datetime] NULL,
  365. [OfferCutoffDate] [datetime] NULL,
  366. [RFPCompensation] [varchar](255) NULL,
  367. [IndemnityCap] [money] NULL,
  368. [PitchDate] [datetime] NULL,
  369. [WinnerId] [int] NULL,
  370. [HasRFPPresent] [bit] NULL,
  371. [HasExecSmry] [bit] NULL,
  372. [HasPhoto] [bit] NULL,
  373. [HasFinalMktPkg] [bit] NULL,
  374. [HasDealHighlight] [bit] NULL,
  375. [IsPostedOnWebSite] [bit] NULL,
  376. [RFPDirectAward] [bit] NULL,
  377. [IsPortfolioDeal] [bit] NOT NULL,
  378. [TotalCap] [money] NULL,
  379. [HireDate] [datetime] NULL,
  380. [DateOMinMarket] [datetime] NULL,
  381. [InitialBidDueDate] [datetime] NULL,
  382. [BuyerSelectionDate] [datetime] NULL,
  383. [CAHFF] [bit] NULL,
  384. [CAInvestor] [bit] NULL,
  385. [DealDocs] [int] NULL,
  386. [ExcludeISV] [bit] NULL,
  387. [SkipBonusPool] [bit] NULL,
  388. [HasFeeAgreement] [bit] NOT NULL,
  389. [HasConsultingAgreement] [bit] NOT NULL,
  390. [NoPropReq] [bit] NOT NULL,
  391. [DealStartDate] [datetime] NULL,
  392. [SalesPrices] [money] NULL,
  393. [MarketingExpenseBudget] [money] NULL,
  394. [ThirdPartyReimburseHFF] [money] NULL,
  395. [ThirdPartyReimburseClient] [money] NULL,
  396. [RequestedBOV] [bit] NULL,
  397. [IsNonMarketing] [bit] NULL,
  398. [PreDealID] [int] NULL,
  399. [PropertyLocations] [varchar](max) NULL,
  400. [HFFLoanID] [varchar](50) NULL,
  401. [ManHours] [int] NULL,
  402. [RFPPitchTeamID] [int] NULL,
  403. [DeadDealReasonID] [int] NULL,
  404. [DeadDealReasonComments] [varchar](500) NULL,
  405. [HideFromReports] [bit] NOT NULL,
  406. [HasMixedUseProperty] [bit] NULL,
  407. [QuoteNotRequired] [bit] NULL,
  408. [DealPitchReminderSent] [datetime] NULL,
  409. [IsEstimate] [bit] NULL,
  410. [JVCategoryID] [int] NULL,
  411. [HasTermSheet] [bit] NULL,
  412. [RFPBOVDate] [datetime] NULL,
  413. [ListPrice] [money] NULL,
  414. [IsSignificant] [bit] NULL,
  415. [UnpaidPrincipalBalance] [money] NULL,
  416. [FeeOriginationPct] [decimal](5, 4) NOT NULL,
  417. [ETeaserPath] [varchar](255) NULL,
  418. [IsAgency] [bit] NULL,
  419. [CoBrokerFee] [money] NULL,
  420. [DealFinancingMethodID] [int] NULL,
  421. [PortfolioID] [int] NULL,
  422. [DateAddedToPortfolio] [datetime] NULL,
  423. [SkipManagementFeeValidation] [bit] NOT NULL,
  424. [FannieMaeFee] [money] NULL,
  425. [IsFannieMae] [bit] NULL,
  426. [SalesforceID] [nvarchar](20) NULL,
  427. [SalesforceUpdate] [bit] NOT NULL,
  428. [SalesForcePush] [bit] NULL,
  429. [CurrencyID] [int] NULL,
  430. [RFPDecisionDate] [datetime] NULL,
  431. CONSTRAINT [PK_Deals] PRIMARY KEY CLUSTERED
  432. (
  433. [DealID] ASC
  434. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  435. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  436.  
  437. GO
  438. SET ANSI_PADDING OFF
  439. GO
  440. /****** Object: Table [dbo].[DealStages] Script Date: 11/25/2017 4:54:20 PM ******/
  441. SET ANSI_NULLS ON
  442. GO
  443. SET QUOTED_IDENTIFIER ON
  444. GO
  445. SET ANSI_PADDING ON
  446. GO
  447. CREATE TABLE [dbo].[DealStages](
  448. [StageID] [int] IDENTITY(1,1) NOT NULL,
  449. [Stage] [varchar](50) NOT NULL,
  450. [DisplayOrder] [int] NOT NULL,
  451. [NotesKeyName] [varchar](50) NULL,
  452. [IsPipeline] [bit] NOT NULL,
  453. [isCompleted] [bit] NOT NULL,
  454. [isQuote] [bit] NOT NULL,
  455. [isApplication] [bit] NOT NULL,
  456. [isCommitment] [bit] NOT NULL,
  457. [isClosed] [bit] NOT NULL,
  458. [StageWeb] [varchar](50) NULL,
  459. [WebClass] [int] NOT NULL,
  460. [ListOnWeb] [bit] NOT NULL,
  461. [CanViewISOffers] [bit] NOT NULL,
  462. CONSTRAINT [PK_DealStages] PRIMARY KEY CLUSTERED
  463. (
  464. [StageID] ASC
  465. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  466. ) ON [PRIMARY]
  467.  
  468. GO
  469. SET ANSI_PADDING OFF
  470. GO
  471. /****** Object: Table [dbo].[DealsToClients] Script Date: 11/25/2017 4:54:20 PM ******/
  472. SET ANSI_NULLS ON
  473. GO
  474. SET QUOTED_IDENTIFIER ON
  475. GO
  476. CREATE TABLE [dbo].[DealsToClients](
  477. [DealID] [int] NOT NULL,
  478. [ClientID] [int] NOT NULL,
  479. [MemberType] [int] NOT NULL,
  480. [isPrimary] [bit] NOT NULL,
  481. [DisplayOrder] [int] NOT NULL,
  482. [InvestorTypeID] [int] NULL,
  483. [DateCreated] [datetime] NOT NULL,
  484. [Volume] [money] NULL,
  485. [VolumePct] [decimal](5, 4) NULL,
  486. [AccountID] [int] NULL,
  487. [SourceOfFundsID] [int] NULL,
  488. [DealsToClientsID] [int] IDENTITY(1,1) NOT NULL,
  489. [SalesForcePush] [bit] NULL,
  490. [CapstackAmount] [money] NULL,
  491. CONSTRAINT [PK_DealsToClients] PRIMARY KEY CLUSTERED
  492. (
  493. [DealID] ASC,
  494. [ClientID] ASC,
  495. [MemberType] ASC
  496. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  497. ) ON [PRIMARY]
  498.  
  499. GO
  500. /****** Object: Table [dbo].[DealsToEmployees] Script Date: 11/25/2017 4:54:20 PM ******/
  501. SET ANSI_NULLS ON
  502. GO
  503. SET QUOTED_IDENTIFIER ON
  504. GO
  505. CREATE TABLE [dbo].[DealsToEmployees](
  506. [DealID] [int] NOT NULL,
  507. [EmployeeID] [int] NOT NULL,
  508. [MemberType] [smallint] NOT NULL,
  509. [isPrimary] [bit] NOT NULL,
  510. [DisplayOrder] [int] NOT NULL,
  511. [isBookProducer] [bit] NOT NULL,
  512. [DateFeesApproved] [datetime] NULL,
  513. [InitialLeadCredit] [decimal](5, 4) NULL,
  514. [ShowOnPropertyListing] [bit] NULL,
  515. [ReceiveEsigEmails] [bit] NULL,
  516. [HasDocumentCenterAccess] [bit] NULL,
  517. [ReceiveDocCenterChangeEmails] [bit] NULL,
  518. [PropertyListingDisplayOrder] [int] NULL,
  519. [ReceiveDocCenterFilesUploadedEmail] [bit] NULL,
  520. [DealsToEmployeesID] [int] IDENTITY(1,1) NOT NULL,
  521. [SalesForcePush] [bit] NULL,
  522. CONSTRAINT [PK_DealsToEmployees] PRIMARY KEY CLUSTERED
  523. (
  524. [DealID] ASC,
  525. [EmployeeID] ASC,
  526. [MemberType] ASC
  527. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  528. ) ON [PRIMARY]
  529.  
  530. GO
  531. /****** Object: Table [dbo].[DealTypes] Script Date: 11/25/2017 4:54:20 PM ******/
  532. SET ANSI_NULLS ON
  533. GO
  534. SET QUOTED_IDENTIFIER ON
  535. GO
  536. SET ANSI_PADDING ON
  537. GO
  538. CREATE TABLE [dbo].[DealTypes](
  539. [DealTypeID] [int] IDENTITY(1,1) NOT NULL,
  540. [DealType] [varchar](50) NOT NULL,
  541. [PlatformID] [int] NULL,
  542. [TransactionTypeID] [int] NULL,
  543. [NotesKeyName] [varchar](50) NULL,
  544. [isMiscellaneous] [bit] NOT NULL,
  545. [isFixedAdjLoan] [bit] NOT NULL,
  546. [DateRemoved] [datetime] NULL,
  547. [FixedFloating] [smallint] NULL,
  548. [IsMarketingOther] [bit] NOT NULL,
  549. [MarketingParentID] [int] NULL,
  550. [RemovedBy] [int] NULL,
  551. [CreatedBy] [int] NULL,
  552. [DateCreated] [datetime] NULL,
  553. [ModifiedBy] [int] NULL,
  554. [DateModified] [datetime] NULL,
  555. [Description] [varchar](1000) NULL,
  556. [VolumeRuleTypeID] [smallint] NOT NULL,
  557. [Options] [int] NULL,
  558. [SortOrder] [int] NULL,
  559. CONSTRAINT [PK_DealTypes] PRIMARY KEY CLUSTERED
  560. (
  561. [DealTypeID] ASC
  562. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  563. ) ON [PRIMARY]
  564.  
  565. GO
  566. SET ANSI_PADDING OFF
  567. GO
  568. /****** Object: Table [dbo].[Departments] Script Date: 11/25/2017 4:54:20 PM ******/
  569. SET ANSI_NULLS ON
  570. GO
  571. SET QUOTED_IDENTIFIER ON
  572. GO
  573. SET ANSI_PADDING ON
  574. GO
  575. CREATE TABLE [dbo].[Departments](
  576. [DepartmentID] [int] IDENTITY(1,1) NOT NULL,
  577. [Department] [varchar](50) NOT NULL,
  578. [NotesKeyName] [varchar](50) NULL,
  579. [isPlatform] [bit] NOT NULL,
  580. [DateRemoved] [datetime] NULL,
  581. CONSTRAINT [PK_Departments] PRIMARY KEY CLUSTERED
  582. (
  583. [DepartmentID] ASC
  584. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  585. ) ON [PRIMARY]
  586.  
  587. GO
  588. SET ANSI_PADDING OFF
  589. GO
  590. /****** Object: Table [dbo].[Employees] Script Date: 11/25/2017 4:54:20 PM ******/
  591. SET ANSI_NULLS ON
  592. GO
  593. SET QUOTED_IDENTIFIER ON
  594. GO
  595. SET ANSI_PADDING ON
  596. GO
  597. CREATE TABLE [dbo].[Employees](
  598. [EmployeeID] [int] IDENTITY(1,1) NOT NULL,
  599. [FirstName] [varchar](50) NOT NULL,
  600. [LastName] [nvarchar](50) NOT NULL,
  601. [MiddleName] [nvarchar](50) NULL,
  602. [NickName] [nvarchar](50) NULL,
  603. [Phone] [varchar](50) NULL,
  604. [Fax] [varchar](50) NULL,
  605. [Cell] [varchar](50) NULL,
  606. [Pager] [varchar](50) NULL,
  607. [Email] [varchar](50) NULL,
  608. [OfficeID] [int] NULL,
  609. [DepartmentID] [int] NULL,
  610. [TitleID] [int] NULL,
  611. [PositionID] [int] NULL,
  612. [SupervisorID] [int] NULL,
  613. [AssistantID] [int] NULL,
  614. [DateLastModified] [datetime] NULL,
  615. [isOfficeHead] [bit] NOT NULL,
  616. [isOfficeAssistant] [bit] NOT NULL,
  617. [isExecCommittee] [bit] NOT NULL,
  618. [WebBio] [varchar](50) NULL,
  619. [DateHired] [datetime] NULL,
  620. [DateTerminated] [datetime] NULL,
  621. [isActive] [bit] NOT NULL,
  622. [DrawAmount] [money] NULL,
  623. [DrawPayback] [numeric](4, 1) NULL,
  624. [NotesUniqueID] [varchar](40) NULL,
  625. [NotesKeyName] [varchar](50) NULL,
  626. [NotesLastModified] [datetime] NULL,
  627. [SkipImport] [bit] NOT NULL,
  628. [ContactID] [int] NULL,
  629. [BudgetFees] [money] NULL,
  630. [isPortfolioManager] [bit] NOT NULL,
  631. [ApproveAllDepts] [smallint] NULL,
  632. [ApproveRequired] [smallint] NULL,
  633. [ShowInLocationsWeb] [bit] NOT NULL,
  634. [isDisplayedWeb] [bit] NOT NULL,
  635. [DateCreated] [datetime] NOT NULL,
  636. [ModifiedBy] [int] NULL,
  637. [CreatedBy] [int] NULL,
  638. [isManager] [bit] NOT NULL,
  639. [DateDeleted] [datetime] NULL,
  640. [ProducerCreateDate] [datetime] NULL,
  641. [Benefit] [money] NULL,
  642. [HomePhone] [varchar](50) NULL,
  643. [WebBioNew] [varchar](50) NULL,
  644. [HRID] [varchar](30) NULL,
  645. [PayGroupID] [int] NULL,
  646. [HFFSHRID] [varchar](30) NULL,
  647. [DateRemoved] [datetime] NULL,
  648. [RemovedBy] [int] NULL,
  649. [TermDealsOutstanding] [bit] NOT NULL,
  650. [PendingHireTerm] [bit] NOT NULL,
  651. [IsContract] [bit] NOT NULL,
  652. [SpouseName] [varchar](50) NULL,
  653. [Address1] [varchar](100) NULL,
  654. [Address2] [varchar](100) NULL,
  655. [Address3] [varchar](100) NULL,
  656. [CityID] [int] NULL,
  657. [Zip1] [varchar](5) NULL,
  658. [Zip2] [varchar](4) NULL,
  659. [Country] [varchar](50) NULL,
  660. [CanDelete] [bit] NOT NULL,
  661. [PhysicalOfficeID] [int] NULL,
  662. [WebAddressMode] [smallint] NOT NULL,
  663. [ProducerGroupID] [smallint] NULL,
  664. [TransactionCategories] [int] NULL,
  665. [ProductSpecialty] [varchar](50) NULL,
  666. [TransactionCatPrimary] [int] NULL,
  667. [CompensationComment] [varchar](500) NULL,
  668. [WebSiteTitle] [varchar](255) NULL,
  669. [IsMediaContact] [bit] NOT NULL,
  670. [MediaSortOrder] [int] NULL,
  671. [LeadershipRoles] [int] NULL,
  672. CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
  673. (
  674. [EmployeeID] ASC
  675. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  676. ) ON [PRIMARY]
  677.  
  678. GO
  679. SET ANSI_PADDING OFF
  680. GO
  681. /****** Object: Table [dbo].[InvestorTypes] Script Date: 11/25/2017 4:54:20 PM ******/
  682. SET ANSI_NULLS ON
  683. GO
  684. SET QUOTED_IDENTIFIER ON
  685. GO
  686. SET ANSI_PADDING ON
  687. GO
  688. CREATE TABLE [dbo].[InvestorTypes](
  689. [InvestorTypeID] [int] IDENTITY(1,1) NOT NULL,
  690. [InvestorType] [varchar](50) NULL,
  691. [NotesKeyName] [varchar](50) NULL,
  692. [isNationalAccount] [smallint] NOT NULL,
  693. [DateRemoved] [datetime] NULL,
  694. [RemovedBy] [int] NULL,
  695. [CreatedBy] [int] NULL,
  696. [DateCreated] [datetime] NULL,
  697. [ModifiedBy] [int] NULL,
  698. [DateModified] [datetime] NULL,
  699. [Description] [varchar](1000) NULL,
  700. [IsCMBS] [bit] NULL,
  701. [IsImport] [bit] NOT NULL,
  702. [AccountAdvisorOption] [int] NULL,
  703. [InvestorTypeOptions] [int] NULL,
  704. [SfInvestorType] [varchar](50) NULL,
  705. CONSTRAINT [PK_InvestorTypes] PRIMARY KEY CLUSTERED
  706. (
  707. [InvestorTypeID] ASC
  708. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  709. ) ON [PRIMARY]
  710.  
  711. GO
  712. SET ANSI_PADDING OFF
  713. GO
  714. /****** Object: Table [dbo].[Offices] Script Date: 11/25/2017 4:54:20 PM ******/
  715. SET ANSI_NULLS ON
  716. GO
  717. SET QUOTED_IDENTIFIER ON
  718. GO
  719. SET ANSI_PADDING ON
  720. GO
  721. CREATE TABLE [dbo].[Offices](
  722. [OfficeID] [int] IDENTITY(1,1) NOT NULL,
  723. [Name] [varchar](25) NOT NULL,
  724. [Address1] [varchar](100) NULL,
  725. [Address2] [varchar](100) NULL,
  726. [Address3] [varchar](100) NULL,
  727. [CityID] [int] NULL,
  728. [Zip1] [varchar](15) NULL,
  729. [Zip2] [varchar](4) NULL,
  730. [Country] [varchar](50) NULL,
  731. [InternalMailCode] [varchar](10) NULL,
  732. [Phone] [varchar](15) NULL,
  733. [Fax] [varchar](15) NULL,
  734. [OfficeAdminID] [int] NULL,
  735. [DateOpened] [datetime] NULL,
  736. [DateClosed] [datetime] NULL,
  737. [isActive] [bit] NOT NULL,
  738. [NotesUniqueID] [varchar](40) NULL,
  739. [NotesKeyName] [varchar](25) NULL,
  740. [NotesLastModified] [datetime] NULL,
  741. [NotesShadowOffice] [varchar](25) NULL,
  742. [DateCreated] [datetime] NOT NULL,
  743. [CreatedBy] [int] NULL,
  744. [ModifiedBy] [int] NULL,
  745. [DateModified] [datetime] NULL,
  746. [OtherPhone] [varchar](15) NULL,
  747. [DateRemoved] [datetime] NULL,
  748. [OfficeRegionID] [int] NULL,
  749. [NameShort] [nchar](10) NULL,
  750. [Options] [int] NULL,
  751. [MapAddress1] [varchar](100) NULL,
  752. [MapAddress2] [varchar](100) NULL,
  753. [MapAddress3] [varchar](100) NULL,
  754. [OfficePhoto] [varchar](255) NULL,
  755. [Latitude] [numeric](10, 7) NULL,
  756. [Longitude] [numeric](10, 7) NULL,
  757. [GeoCodeLastAttempt] [datetime] NULL,
  758. [IsGeocodeSuccess] [smallint] NULL,
  759. [GooglePrecision] [smallint] NULL,
  760. [PropertyListingRegionID] [int] NULL,
  761. [GeocodeAdjustedByUser] [bit] NULL,
  762. [IPStart] [bigint] NULL,
  763. [IPEnd] [bigint] NULL,
  764. [LocalDocsPath] [varchar](500) NULL,
  765. CONSTRAINT [PK_Offices] PRIMARY KEY CLUSTERED
  766. (
  767. [OfficeID] ASC
  768. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  769. ) ON [PRIMARY]
  770.  
  771. GO
  772. SET ANSI_PADDING OFF
  773. GO
  774. /****** Object: Table [dbo].[PropertyTypeGroups] Script Date: 11/25/2017 4:54:20 PM ******/
  775. SET ANSI_NULLS ON
  776. GO
  777. SET QUOTED_IDENTIFIER ON
  778. GO
  779. SET ANSI_PADDING ON
  780. GO
  781. CREATE TABLE [dbo].[PropertyTypeGroups](
  782. [GroupID] [int] IDENTITY(1,1) NOT NULL,
  783. [GroupName] [varchar](50) NOT NULL,
  784. [NotesKeyName] [varchar](50) NULL,
  785. [SortOrder] [int] NULL,
  786. [Options] [int] NOT NULL,
  787. [UnitID] [smallint] NULL,
  788. [IconFilePrefix] [varchar](50) NULL,
  789. CONSTRAINT [PK_PropertyTypeGroups] PRIMARY KEY CLUSTERED
  790. (
  791. [GroupID] ASC
  792. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  793. ) ON [PRIMARY]
  794.  
  795. GO
  796. SET ANSI_PADDING OFF
  797. GO
  798. /****** Object: Table [dbo].[PropertyTypes] Script Date: 11/25/2017 4:54:20 PM ******/
  799. SET ANSI_NULLS ON
  800. GO
  801. SET QUOTED_IDENTIFIER ON
  802. GO
  803. SET ANSI_PADDING ON
  804. GO
  805. CREATE TABLE [dbo].[PropertyTypes](
  806. [PropertyTypeID] [int] IDENTITY(1,1) NOT NULL,
  807. [PropertyType] [varchar](50) NOT NULL,
  808. [ParentID] [int] NULL,
  809. [GroupID] [int] NULL,
  810. [NotesKeyName] [varchar](50) NULL,
  811. [DateRemoved] [datetime] NULL,
  812. [UnitType] [int] NULL,
  813. [IsOtherMarketing] [bit] NULL,
  814. [CreatedBy] [varchar](50) NULL,
  815. [DateCreated] [datetime] NULL,
  816. [ModifiedBy] [char](50) NULL,
  817. [DateModified] [datetime] NULL,
  818. [RemovedBy] [varchar](50) NULL,
  819. [Description] [varchar](1000) NULL,
  820. [ValidationGroupID] [int] NULL,
  821. [ValidationOptions] [int] NULL,
  822. [RequiresSubType] [bit] NOT NULL,
  823. [Options] [int] NOT NULL,
  824. [ShowOnBusCardProfile] [bit] NOT NULL,
  825. [ShowOnWebSite] [bit] NOT NULL,
  826. [SortWeb] [int] NOT NULL,
  827. [IsSearchableOnWebsite] [bit] NULL,
  828. [PublicPropertyTypeID] [int] NULL,
  829. CONSTRAINT [PK_PropertyTypes] PRIMARY KEY CLUSTERED
  830. (
  831. [PropertyTypeID] ASC
  832. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  833. ) ON [PRIMARY]
  834.  
  835. GO
  836. SET ANSI_PADDING OFF
  837. GO
  838. /****** Object: Table [dbo].[Regions] Script Date: 11/25/2017 4:54:20 PM ******/
  839. SET ANSI_NULLS ON
  840. GO
  841. SET QUOTED_IDENTIFIER ON
  842. GO
  843. SET ANSI_PADDING ON
  844. GO
  845. CREATE TABLE [dbo].[Regions](
  846. [RegionID] [int] IDENTITY(1,1) NOT NULL,
  847. [Region] [varchar](50) NOT NULL,
  848. [DateRemoved] [datetime] NULL,
  849. [IsRollupRegion] [bit] NOT NULL,
  850. [ParentRegionID] [int] NULL,
  851. [IsForeign] [bit] NOT NULL,
  852. [RegionCode] [varchar](2) NULL,
  853. [RegionType] [smallint] NOT NULL,
  854. CONSTRAINT [PK_Regions] PRIMARY KEY CLUSTERED
  855. (
  856. [RegionID] ASC
  857. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  858. ) ON [PRIMARY]
  859.  
  860. GO
  861. SET ANSI_PADDING OFF
  862. GO
  863. /****** Object: Table [dbo].[States] Script Date: 11/25/2017 4:54:20 PM ******/
  864. SET ANSI_NULLS ON
  865. GO
  866. SET QUOTED_IDENTIFIER ON
  867. GO
  868. SET ANSI_PADDING ON
  869. GO
  870. CREATE TABLE [dbo].[States](
  871. [StateID] [int] IDENTITY(1,1) NOT NULL,
  872. [State] [varchar](10) NOT NULL,
  873. [StateLong] [varchar](50) NULL,
  874. [Country] [varchar](50) NULL,
  875. [isFixup] [bit] NOT NULL,
  876. [RegionID] [int] NULL,
  877. [FIPS] [varchar](10) NULL,
  878. [ParentRegionID] [int] NULL,
  879. [zRegionID] [int] NULL,
  880. [CountryID] [int] NULL,
  881. [ShowRELicenseText] [bit] NOT NULL,
  882. [RELicenseText] [varchar](500) NULL,
  883. [RELicenseHideNonLicTeam] [bit] NOT NULL,
  884. [ShowRELicenseTextHFFS] [bit] NOT NULL,
  885. [ShowRELicenseTextInAll] [bit] NOT NULL,
  886. [FreddieRegionID] [int] NULL,
  887. [RCARegionID] [int] NULL,
  888. [RegionID092013] [int] NULL,
  889. [WebSiteDisplayOptions] [int] NULL,
  890. CONSTRAINT [PK_States] PRIMARY KEY CLUSTERED
  891. (
  892. [StateID] ASC
  893. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  894. ) ON [PRIMARY]
  895.  
  896. GO
  897. SET ANSI_PADDING OFF
  898. GO
  899. /****** Object: Table [report].[MonthlyDealAllocations] Script Date: 11/25/2017 4:54:20 PM ******/
  900. SET ANSI_NULLS ON
  901. GO
  902. SET QUOTED_IDENTIFIER ON
  903. GO
  904. CREATE TABLE [report].[MonthlyDealAllocations](
  905. [PeriodStartDate] [datetime] NULL,
  906. [PeriodEndDate] [datetime] NULL,
  907. [DealID] [int] NULL,
  908. [AllocatedDepartmentID] [int] NULL,
  909. [AllocatedOfficeID] [int] NULL,
  910. [OfficeAllocVolumePipeline] [money] NULL,
  911. [OfficeAllocVolumeCompleted] [money] NULL,
  912. [OfficeAllocFeePipeline] [money] NULL,
  913. [OfficeAllocFeeCompleted] [money] NULL,
  914. [OfficeAllocVolumePipelineGBP] [money] NULL,
  915. [OfficeAllocVolumeCompletedGBP] [money] NULL,
  916. [OfficeAllocFeePipelineGBP] [money] NULL,
  917. [OfficeAllocFeeCompletedGBP] [money] NULL,
  918. [CountDealCompleted] [int] NULL,
  919. [StageID] [int] NULL
  920. ) ON [PRIMARY]
  921.  
  922. GO
  923. SET ANSI_PADDING ON
  924.  
  925. GO
  926. /****** Object: Index [IX_Assets_PropertyAddress] Script Date: 11/25/2017 4:54:20 PM ******/
  927. CREATE NONCLUSTERED INDEX [IX_Assets_PropertyAddress] ON [dbo].[Assets]
  928. (
  929. [CityId] ASC,
  930. [Zip] ASC
  931. )
  932. INCLUDE ( [Address1],
  933. [PropertyTypeID],
  934. [AssetID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  935. GO
  936. /****** Object: Index [IX_Assets_PropertyTypeID] Script Date: 11/25/2017 4:54:20 PM ******/
  937. CREATE NONCLUSTERED INDEX [IX_Assets_PropertyTypeID] ON [dbo].[Assets]
  938. (
  939. [PropertyTypeID] ASC
  940. )
  941. INCLUDE ( [PropertyUnitType],
  942. [DateCreated]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  943. GO
  944. /****** Object: Index [IX_Assets_RCAPropertyID] Script Date: 11/25/2017 4:54:20 PM ******/
  945. CREATE NONCLUSTERED INDEX [IX_Assets_RCAPropertyID] ON [dbo].[Assets]
  946. (
  947. [RCAPropertyID] ASC
  948. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  949. GO
  950. /****** Object: Index [IX_CacheClients_CityID] Script Date: 11/25/2017 4:54:20 PM ******/
  951. CREATE NONCLUSTERED INDEX [IX_CacheClients_CityID] ON [dbo].[CacheClients]
  952. (
  953. [CityID] ASC
  954. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  955. GO
  956. SET ANSI_PADDING ON
  957.  
  958. GO
  959. /****** Object: Index [IX_CacheClients_CurrentClientID] Script Date: 11/25/2017 4:54:20 PM ******/
  960. CREATE NONCLUSTERED INDEX [IX_CacheClients_CurrentClientID] ON [dbo].[CacheClients]
  961. (
  962. [CurrentClientID] ASC,
  963. [isSearchable] ASC
  964. )
  965. INCLUDE ( [ClientID],
  966. [ClientName],
  967. [MappingCode],
  968. [OldClientName]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  969. GO
  970. /****** Object: Index [IX_CacheClients_InvestorType] Script Date: 11/25/2017 4:54:20 PM ******/
  971. CREATE NONCLUSTERED INDEX [IX_CacheClients_InvestorType] ON [dbo].[CacheClients]
  972. (
  973. [InvestorTypeID] ASC,
  974. [isSearchable] ASC
  975. )
  976. INCLUDE ( [ClientID],
  977. [ThirdPartyCategoryID],
  978. [OnDealsAsClient],
  979. [OnDealsAsInvestor],
  980. [isDeleted],
  981. [Books]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  982. GO
  983. SET ANSI_PADDING ON
  984.  
  985. GO
  986. /****** Object: Index [IX_CacheClients_Name] Script Date: 11/25/2017 4:54:20 PM ******/
  987. CREATE NONCLUSTERED INDEX [IX_CacheClients_Name] ON [dbo].[CacheClients]
  988. (
  989. [ClientName] ASC,
  990. [isDeleted] ASC
  991. )
  992. INCLUDE ( [ClientID],
  993. [CurrentClientID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  994. GO
  995. SET ANSI_PADDING ON
  996.  
  997. GO
  998. /****** Object: Index [IX_CacheClients_OldName] Script Date: 11/25/2017 4:54:20 PM ******/
  999. CREATE NONCLUSTERED INDEX [IX_CacheClients_OldName] ON [dbo].[CacheClients]
  1000. (
  1001. [OldClientName] ASC,
  1002. [isDeleted] ASC
  1003. )
  1004. INCLUDE ( [ClientID],
  1005. [CurrentClientID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1006. GO
  1007. SET ANSI_PADDING ON
  1008.  
  1009. GO
  1010. /****** Object: Index [IX_CacheClients_PreMergerName] Script Date: 11/25/2017 4:54:20 PM ******/
  1011. CREATE NONCLUSTERED INDEX [IX_CacheClients_PreMergerName] ON [dbo].[CacheClients]
  1012. (
  1013. [PreMergerClientName] ASC,
  1014. [isDeleted] ASC
  1015. )
  1016. INCLUDE ( [ClientID],
  1017. [CurrentClientID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1018. GO
  1019. SET ANSI_PADDING ON
  1020.  
  1021. GO
  1022. /****** Object: Index [IX_CacheClients_SFID] Script Date: 11/25/2017 4:54:20 PM ******/
  1023. CREATE NONCLUSTERED INDEX [IX_CacheClients_SFID] ON [dbo].[CacheClients]
  1024. (
  1025. [SalesForceID] ASC
  1026. )
  1027. INCLUDE ( [ClientID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1028. GO
  1029. /****** Object: Index [IX_CacheClients_Standard] Script Date: 11/25/2017 4:54:20 PM ******/
  1030. CREATE NONCLUSTERED INDEX [IX_CacheClients_Standard] ON [dbo].[CacheClients]
  1031. (
  1032. [Books] ASC,
  1033. [isSearchable] ASC,
  1034. [isDeleted] ASC,
  1035. [ThirdPartyCategoryID] ASC,
  1036. [OnDealsAsClient] ASC,
  1037. [OnDealsAsInvestor] ASC
  1038. )
  1039. INCLUDE ( [ClientID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1040. GO
  1041. /****** Object: Index [IX_Cities] Script Date: 11/25/2017 4:54:20 PM ******/
  1042. CREATE NONCLUSTERED INDEX [IX_Cities] ON [dbo].[Cities]
  1043. (
  1044. [RegionID] ASC
  1045. )
  1046. INCLUDE ( [isDisplay],
  1047. [isDeleted]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1048. GO
  1049. /****** Object: Index [IX_Cities_1] Script Date: 11/25/2017 4:54:20 PM ******/
  1050. CREATE NONCLUSTERED INDEX [IX_Cities_1] ON [dbo].[Cities]
  1051. (
  1052. [StateID] ASC
  1053. )
  1054. INCLUDE ( [isDisplay],
  1055. [isDeleted]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1056. GO
  1057. /****** Object: Index [IX_Cities_2] Script Date: 11/25/2017 4:54:20 PM ******/
  1058. CREATE NONCLUSTERED INDEX [IX_Cities_2] ON [dbo].[Cities]
  1059. (
  1060. [CountryID] ASC
  1061. )
  1062. INCLUDE ( [isDisplay],
  1063. [isDeleted]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1064. GO
  1065. SET ANSI_PADDING ON
  1066.  
  1067. GO
  1068. /****** Object: Index [IX_Cities_4] Script Date: 11/25/2017 4:54:20 PM ******/
  1069. CREATE NONCLUSTERED INDEX [IX_Cities_4] ON [dbo].[Cities]
  1070. (
  1071. [City] ASC
  1072. )
  1073. INCLUDE ( [isDeleted],
  1074. [isDisplay],
  1075. [State]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1076. GO
  1077. /****** Object: Index [IX_DealProperties_AssetID] Script Date: 11/25/2017 4:54:20 PM ******/
  1078. CREATE NONCLUSTERED INDEX [IX_DealProperties_AssetID] ON [dbo].[DealProperties]
  1079. (
  1080. [AssetID] ASC
  1081. )
  1082. INCLUDE ( [DateRemoved]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1083. GO
  1084. /****** Object: Index [IX_DealProperties_CityID] Script Date: 11/25/2017 4:54:20 PM ******/
  1085. CREATE NONCLUSTERED INDEX [IX_DealProperties_CityID] ON [dbo].[DealProperties]
  1086. (
  1087. [OriginalCityId] ASC
  1088. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1089. GO
  1090. /****** Object: Index [IX_DealProperties_DateRemoved] Script Date: 11/25/2017 4:54:20 PM ******/
  1091. CREATE NONCLUSTERED INDEX [IX_DealProperties_DateRemoved] ON [dbo].[DealProperties]
  1092. (
  1093. [DateRemoved] ASC
  1094. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1095. GO
  1096. /****** Object: Index [IX_DealProperties_DealID] Script Date: 11/25/2017 4:54:20 PM ******/
  1097. CREATE NONCLUSTERED INDEX [IX_DealProperties_DealID] ON [dbo].[DealProperties]
  1098. (
  1099. [DealID] ASC
  1100. )
  1101. INCLUDE ( [AssetID],
  1102. [DateRemoved],
  1103. [IsMainProperty],
  1104. [PropertyID],
  1105. [PropertyTypeID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1106. GO
  1107. /****** Object: Index [IX_DealProperties_LatLon] Script Date: 11/25/2017 4:54:20 PM ******/
  1108. CREATE NONCLUSTERED INDEX [IX_DealProperties_LatLon] ON [dbo].[DealProperties]
  1109. (
  1110. [OriginalLatitude] ASC,
  1111. [OriginalLongitude] ASC
  1112. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1113. GO
  1114. /****** Object: Index [IX_DealProperties_PropTypeID] Script Date: 11/25/2017 4:54:20 PM ******/
  1115. CREATE NONCLUSTERED INDEX [IX_DealProperties_PropTypeID] ON [dbo].[DealProperties]
  1116. (
  1117. [PropertyTypeID] ASC
  1118. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1119. GO
  1120. /****** Object: Index [IX_AccountingDate] Script Date: 11/25/2017 4:54:20 PM ******/
  1121. CREATE NONCLUSTERED INDEX [IX_AccountingDate] ON [dbo].[Deals]
  1122. (
  1123. [AccountingDate] ASC
  1124. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1125. GO
  1126. /****** Object: Index [IX_Deals] Script Date: 11/25/2017 4:54:20 PM ******/
  1127. CREATE NONCLUSTERED INDEX [IX_Deals] ON [dbo].[Deals]
  1128. (
  1129. [OfficeID] ASC,
  1130. [DepartmentID] ASC
  1131. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1132. GO
  1133. /****** Object: Index [IX_Deals_1] Script Date: 11/25/2017 4:54:20 PM ******/
  1134. CREATE NONCLUSTERED INDEX [IX_Deals_1] ON [dbo].[Deals]
  1135. (
  1136. [DealTypeID] ASC
  1137. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1138. GO
  1139. SET ANSI_PADDING ON
  1140.  
  1141. GO
  1142. /****** Object: Index [IX_Deals_10] Script Date: 11/25/2017 4:54:20 PM ******/
  1143. CREATE NONCLUSTERED INDEX [IX_Deals_10] ON [dbo].[Deals]
  1144. (
  1145. [DealID] ASC,
  1146. [DateRemoved] ASC
  1147. )
  1148. INCLUDE ( [DealName],
  1149. [StageID],
  1150. [DealTypeID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1151. GO
  1152. SET ANSI_PADDING ON
  1153.  
  1154. GO
  1155. /****** Object: Index [IX_Deals_3] Script Date: 11/25/2017 4:54:20 PM ******/
  1156. CREATE NONCLUSTERED INDEX [IX_Deals_3] ON [dbo].[Deals]
  1157. (
  1158. [DealName] ASC
  1159. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1160. GO
  1161. /****** Object: Index [IX_Deals_4] Script Date: 11/25/2017 4:54:20 PM ******/
  1162. CREATE NONCLUSTERED INDEX [IX_Deals_4] ON [dbo].[Deals]
  1163. (
  1164. [StageID] ASC
  1165. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1166. GO
  1167. /****** Object: Index [IX_Deals_5] Script Date: 11/25/2017 4:54:20 PM ******/
  1168. CREATE NONCLUSTERED INDEX [IX_Deals_5] ON [dbo].[Deals]
  1169. (
  1170. [Amount] ASC
  1171. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1172. GO
  1173. /****** Object: Index [IX_Deals_6] Script Date: 11/25/2017 4:54:20 PM ******/
  1174. CREATE NONCLUSTERED INDEX [IX_Deals_6] ON [dbo].[Deals]
  1175. (
  1176. [HFFTotalFee] ASC,
  1177. [DateFeeExpected] ASC
  1178. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1179. GO
  1180. /****** Object: Index [IX_Deals_7] Script Date: 11/25/2017 4:54:20 PM ******/
  1181. CREATE NONCLUSTERED INDEX [IX_Deals_7] ON [dbo].[Deals]
  1182. (
  1183. [isDeleted] ASC,
  1184. [StageID] ASC
  1185. )
  1186. INCLUDE ( [DealID],
  1187. [DealTypeID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1188. GO
  1189. SET ANSI_PADDING ON
  1190.  
  1191. GO
  1192. /****** Object: Index [IX_Deals_SFID] Script Date: 11/25/2017 4:54:20 PM ******/
  1193. CREATE NONCLUSTERED INDEX [IX_Deals_SFID] ON [dbo].[Deals]
  1194. (
  1195. [SalesforceID] ASC
  1196. )
  1197. INCLUDE ( [DealID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1198. GO
  1199. /****** Object: Index [IX_PortfolioID] Script Date: 11/25/2017 4:54:20 PM ******/
  1200. CREATE NONCLUSTERED INDEX [IX_PortfolioID] ON [dbo].[Deals]
  1201. (
  1202. [PortfolioID] ASC
  1203. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1204. GO
  1205. /****** Object: Index [IX_DealsToClients] Script Date: 11/25/2017 4:54:20 PM ******/
  1206. CREATE NONCLUSTERED INDEX [IX_DealsToClients] ON [dbo].[DealsToClients]
  1207. (
  1208. [ClientID] ASC,
  1209. [MemberType] ASC
  1210. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  1211. GO
  1212. /****** Object: Index [IX_DealsToEmployees] Script Date: 11/25/2017 4:54:20 PM ******/
  1213. CREATE NONCLUSTERED INDEX [IX_DealsToEmployees] ON [dbo].[DealsToEmployees]
  1214. (
  1215. [EmployeeID] ASC,
  1216. [MemberType] ASC
  1217. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  1218. GO
  1219. SET ANSI_PADDING ON
  1220.  
  1221. GO
  1222. /****** Object: Index [_dta_index_Employees_10_1835921662__K1_2_3] Script Date: 11/25/2017 4:54:20 PM ******/
  1223. CREATE NONCLUSTERED INDEX [_dta_index_Employees_10_1835921662__K1_2_3] ON [dbo].[Employees]
  1224. (
  1225. [EmployeeID] ASC
  1226. )
  1227. INCLUDE ( [LastName],
  1228. [FirstName]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1229. GO
  1230. SET ANSI_PADDING ON
  1231.  
  1232. GO
  1233. /****** Object: Index [IX_Employees_1] Script Date: 11/25/2017 4:54:20 PM ******/
  1234. CREATE NONCLUSTERED INDEX [IX_Employees_1] ON [dbo].[Employees]
  1235. (
  1236. [LastName] ASC,
  1237. [FirstName] ASC
  1238. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1239. GO
  1240. /****** Object: Index [IX_Employees_2] Script Date: 11/25/2017 4:54:20 PM ******/
  1241. CREATE NONCLUSTERED INDEX [IX_Employees_2] ON [dbo].[Employees]
  1242. (
  1243. [OfficeID] ASC,
  1244. [DepartmentID] ASC
  1245. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1246. GO
  1247. /****** Object: Index [IX_Employees_3] Script Date: 11/25/2017 4:54:20 PM ******/
  1248. CREATE NONCLUSTERED INDEX [IX_Employees_3] ON [dbo].[Employees]
  1249. (
  1250. [TitleID] ASC,
  1251. [PositionID] ASC
  1252. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1253. GO
  1254. /****** Object: Index [IX_Employees_4] Script Date: 11/25/2017 4:54:20 PM ******/
  1255. CREATE NONCLUSTERED INDEX [IX_Employees_4] ON [dbo].[Employees]
  1256. (
  1257. [ContactID] ASC
  1258. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1259. GO
  1260. /****** Object: Index [IX_PropertyTypeGroup] Script Date: 11/25/2017 4:54:20 PM ******/
  1261. CREATE NONCLUSTERED INDEX [IX_PropertyTypeGroup] ON [dbo].[PropertyTypes]
  1262. (
  1263. [GroupID] ASC
  1264. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1265. GO
  1266. /****** Object: Index [IX_PropertyTypeParent] Script Date: 11/25/2017 4:54:20 PM ******/
  1267. CREATE NONCLUSTERED INDEX [IX_PropertyTypeParent] ON [dbo].[PropertyTypes]
  1268. (
  1269. [ParentID] ASC
  1270. )
  1271. INCLUDE ( [PropertyTypeID],
  1272. [DateRemoved]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1273. GO
  1274. /****** Object: Index [IX_MonthlyDealAllocations_DealID_AllocDeptID_AllocOfficeID] Script Date: 11/25/2017 4:54:20 PM ******/
  1275. CREATE NONCLUSTERED INDEX [IX_MonthlyDealAllocations_DealID_AllocDeptID_AllocOfficeID] ON [report].[MonthlyDealAllocations]
  1276. (
  1277. [DealID] ASC,
  1278. [AllocatedDepartmentID] ASC,
  1279. [AllocatedOfficeID] ASC
  1280. )
  1281. INCLUDE ( [PeriodStartDate],
  1282. [PeriodEndDate],
  1283. [CountDealCompleted],
  1284. [StageID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1285. GO
  1286. ALTER TABLE [dbo].[Assets] ADD CONSTRAINT [DF_Properties_IsGeocodeSuccess] DEFAULT ((0)) FOR [IsGeocodeSuccess]
  1287. GO
  1288. ALTER TABLE [dbo].[Assets] ADD CONSTRAINT [DF_Properties_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1289. GO
  1290. ALTER TABLE [dbo].[Assets] ADD CONSTRAINT [DF_Assets_IsProtfolio] DEFAULT ((0)) FOR [IsPortfolio]
  1291. GO
  1292. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isCMBS] DEFAULT ((0)) FOR [isCMBS]
  1293. GO
  1294. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isNationalAccount] DEFAULT ((0)) FOR [isNationalAccount]
  1295. GO
  1296. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isCorrespondent] DEFAULT ((0)) FOR [isInvestorCorrespondent]
  1297. GO
  1298. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isInvestorServicing] DEFAULT ((0)) FOR [isInvestorServicing]
  1299. GO
  1300. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isUmbrella] DEFAULT ((0)) FOR [isUmbrella]
  1301. GO
  1302. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isForeign] DEFAULT ((0)) FOR [isForeign]
  1303. GO
  1304. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isSearchable] DEFAULT ((0)) FOR [isSearchable]
  1305. GO
  1306. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_isDeleted] DEFAULT ((0)) FOR [isDeleted]
  1307. GO
  1308. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_CurrentClientIsDeleted] DEFAULT ((0)) FOR [CurrentClientIsDeleted]
  1309. GO
  1310. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_Books] DEFAULT ((0)) FOR [Books]
  1311. GO
  1312. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_IsFreddieMac] DEFAULT ((0)) FOR [IsFreddieMac]
  1313. GO
  1314. ALTER TABLE [dbo].[CacheClients] ADD CONSTRAINT [DF_CacheClients_HFFWarehouseLOC] DEFAULT ((0)) FOR [HFFWarehouseLOC]
  1315. GO
  1316. ALTER TABLE [dbo].[Cities] ADD CONSTRAINT [DF_Cities_isDeleted] DEFAULT ((0)) FOR [isDeleted]
  1317. GO
  1318. ALTER TABLE [dbo].[Cities] ADD CONSTRAINT [DF_Cities_isDisplay] DEFAULT ((1)) FOR [isDisplay]
  1319. GO
  1320. ALTER TABLE [dbo].[Cities] ADD CONSTRAINT [DF_Cities_IsGateway] DEFAULT ((0)) FOR [IsGateway]
  1321. GO
  1322. ALTER TABLE [dbo].[Cities] ADD CONSTRAINT [DF_Cities_HasMSAOverride] DEFAULT ((0)) FOR [HasMSAOverride]
  1323. GO
  1324. ALTER TABLE [dbo].[DealPlatforms] ADD CONSTRAINT [DF_DealPlatforms_DisplayOrder] DEFAULT (0) FOR [DisplayOrder]
  1325. GO
  1326. ALTER TABLE [dbo].[DealPlatforms] ADD CONSTRAINT [DF_DealPlatforms_DispShortNameOffice] DEFAULT (0) FOR [DisplayWithOffice]
  1327. GO
  1328. ALTER TABLE [dbo].[DealPlatforms] ADD CONSTRAINT [DF_DealPlatforms_IsDebt] DEFAULT (0) FOR [IsDebt]
  1329. GO
  1330. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_IsGeocodeSuccess] DEFAULT ((0)) FOR [OriginalIsGeocodeSuccess]
  1331. GO
  1332. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_IsFinancedByHFF] DEFAULT ((0)) FOR [IsFinancedByHFF]
  1333. GO
  1334. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1335. GO
  1336. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_DisplayInPropertyListing] DEFAULT ((1)) FOR [DisplayInPropertyListing]
  1337. GO
  1338. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_IsMainProperty] DEFAULT ((0)) FOR [IsMainProperty]
  1339. GO
  1340. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_ExcludeISV] DEFAULT ((0)) FOR [ExcludeISV]
  1341. GO
  1342. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_UseGoogleMapSm] DEFAULT ((1)) FOR [UseGoogleMapSm]
  1343. GO
  1344. ALTER TABLE [dbo].[DealProperties] ADD CONSTRAINT [DF_DealProperties_UseGoogleMapMed] DEFAULT ((1)) FOR [UseGoogleMapMed]
  1345. GO
  1346. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_StageID] DEFAULT ((0)) FOR [StageID]
  1347. GO
  1348. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_Amount] DEFAULT ((0)) FOR [Amount]
  1349. GO
  1350. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_isDeleted] DEFAULT ((0)) FOR [isDeleted]
  1351. GO
  1352. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1353. GO
  1354. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_isFeeGrandFathered] DEFAULT ((0)) FOR [isFeeGrandFathered]
  1355. GO
  1356. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_WinnerId] DEFAULT ((0)) FOR [WinnerId]
  1357. GO
  1358. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasRFPPresent] DEFAULT ((0)) FOR [HasRFPPresent]
  1359. GO
  1360. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasExecSmry] DEFAULT ((0)) FOR [HasExecSmry]
  1361. GO
  1362. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasPhoto] DEFAULT ((0)) FOR [HasPhoto]
  1363. GO
  1364. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasFinalMktPkg] DEFAULT ((0)) FOR [HasFinalMktPkg]
  1365. GO
  1366. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasDealHighlight] DEFAULT ((0)) FOR [HasDealHighlight]
  1367. GO
  1368. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_RFPDirectAward] DEFAULT ((0)) FOR [RFPDirectAward]
  1369. GO
  1370. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_IsPortfolioDeal] DEFAULT ((0)) FOR [IsPortfolioDeal]
  1371. GO
  1372. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_DealDocs] DEFAULT ((0)) FOR [DealDocs]
  1373. GO
  1374. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_ExcludeISV] DEFAULT ((0)) FOR [ExcludeISV]
  1375. GO
  1376. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_SkipBonusPool] DEFAULT ((0)) FOR [SkipBonusPool]
  1377. GO
  1378. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasFeeAgreement] DEFAULT ((0)) FOR [HasFeeAgreement]
  1379. GO
  1380. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasConsultingAgreement] DEFAULT ((0)) FOR [HasConsultingAgreement]
  1381. GO
  1382. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_NoPropReq] DEFAULT ((0)) FOR [NoPropReq]
  1383. GO
  1384. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_DealStart] DEFAULT (getdate()) FOR [DealStartDate]
  1385. GO
  1386. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_RequestedBOV] DEFAULT ((0)) FOR [RequestedBOV]
  1387. GO
  1388. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HideFromReports] DEFAULT ((0)) FOR [HideFromReports]
  1389. GO
  1390. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasMixedUseProperty] DEFAULT ((0)) FOR [HasMixedUseProperty]
  1391. GO
  1392. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_HasRFPPresent1] DEFAULT ((0)) FOR [HasTermSheet]
  1393. GO
  1394. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_Amount1] DEFAULT ((0)) FOR [UnpaidPrincipalBalance]
  1395. GO
  1396. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_FeeOriginationPct] DEFAULT ((0)) FOR [FeeOriginationPct]
  1397. GO
  1398. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_SkipManagementFeeValidation] DEFAULT ((0)) FOR [SkipManagementFeeValidation]
  1399. GO
  1400. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF__Deals__Salesforc__76E317F6] DEFAULT ((0)) FOR [SalesforceUpdate]
  1401. GO
  1402. ALTER TABLE [dbo].[Deals] ADD CONSTRAINT [DF_Deals_CurrencyID] DEFAULT ((1)) FOR [CurrencyID]
  1403. GO
  1404. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_DisplayOrder] DEFAULT ((0)) FOR [DisplayOrder]
  1405. GO
  1406. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_IsPipeline] DEFAULT ((0)) FOR [IsPipeline]
  1407. GO
  1408. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_isCompleted] DEFAULT ((0)) FOR [isCompleted]
  1409. GO
  1410. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_isQuote] DEFAULT ((0)) FOR [isQuote]
  1411. GO
  1412. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_isApplication] DEFAULT ((0)) FOR [isApplication]
  1413. GO
  1414. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_isCommitment] DEFAULT ((0)) FOR [isCommitment]
  1415. GO
  1416. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_isClosed] DEFAULT ((0)) FOR [isClosed]
  1417. GO
  1418. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_WebClass] DEFAULT ((0)) FOR [WebClass]
  1419. GO
  1420. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_ListOnWeb] DEFAULT ((0)) FOR [ListOnWeb]
  1421. GO
  1422. ALTER TABLE [dbo].[DealStages] ADD CONSTRAINT [DF_DealStages_CanViewISOffers] DEFAULT ((1)) FOR [CanViewISOffers]
  1423. GO
  1424. ALTER TABLE [dbo].[DealsToClients] ADD CONSTRAINT [DF_DealsToClients_isPrimary] DEFAULT (0) FOR [isPrimary]
  1425. GO
  1426. ALTER TABLE [dbo].[DealsToClients] ADD CONSTRAINT [DF_DealsToClients_DisplayOrder] DEFAULT (0) FOR [DisplayOrder]
  1427. GO
  1428. ALTER TABLE [dbo].[DealsToClients] ADD CONSTRAINT [DF_DealsToClients_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1429. GO
  1430. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_isPrimary] DEFAULT (0) FOR [isPrimary]
  1431. GO
  1432. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_DisplayOrder] DEFAULT (0) FOR [DisplayOrder]
  1433. GO
  1434. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_isBookProducer] DEFAULT (0) FOR [isBookProducer]
  1435. GO
  1436. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_ShowOnPropertyListing] DEFAULT ((0)) FOR [ShowOnPropertyListing]
  1437. GO
  1438. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_ReceiveEsigEmail] DEFAULT ((0)) FOR [ReceiveEsigEmails]
  1439. GO
  1440. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_HasDocumentCenterAccess] DEFAULT ((0)) FOR [HasDocumentCenterAccess]
  1441. GO
  1442. ALTER TABLE [dbo].[DealsToEmployees] ADD CONSTRAINT [DF_DealsToEmployees_ReceiveDocCenterChangeEmails] DEFAULT ((0)) FOR [ReceiveDocCenterChangeEmails]
  1443. GO
  1444. ALTER TABLE [dbo].[DealTypes] ADD CONSTRAINT [DF_DealTypes_isMiscellaneous] DEFAULT ((0)) FOR [isMiscellaneous]
  1445. GO
  1446. ALTER TABLE [dbo].[DealTypes] ADD CONSTRAINT [DF_DealTypes_isFixedAdjLoan] DEFAULT ((0)) FOR [isFixedAdjLoan]
  1447. GO
  1448. ALTER TABLE [dbo].[DealTypes] ADD CONSTRAINT [DF_DealTypes_IsMarketingOther] DEFAULT ((0)) FOR [IsMarketingOther]
  1449. GO
  1450. ALTER TABLE [dbo].[DealTypes] ADD CONSTRAINT [DF_DealTypes_VolumeRuleTypeID] DEFAULT ((0)) FOR [VolumeRuleTypeID]
  1451. GO
  1452. ALTER TABLE [dbo].[DealTypes] ADD CONSTRAINT [DF_DealTypes_SortOrder] DEFAULT ((2)) FOR [SortOrder]
  1453. GO
  1454. ALTER TABLE [dbo].[Departments] ADD CONSTRAINT [DF_Departments_isPlatform] DEFAULT ((0)) FOR [isPlatform]
  1455. GO
  1456. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isOfficeHead] DEFAULT ((0)) FOR [isOfficeHead]
  1457. GO
  1458. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isOfficeAssistant] DEFAULT ((0)) FOR [isOfficeAssistant]
  1459. GO
  1460. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isExecCommitte] DEFAULT ((0)) FOR [isExecCommittee]
  1461. GO
  1462. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isActive] DEFAULT ((1)) FOR [isActive]
  1463. GO
  1464. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_SkipImport] DEFAULT ((0)) FOR [SkipImport]
  1465. GO
  1466. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isServicePortfolioManager] DEFAULT ((0)) FOR [isPortfolioManager]
  1467. GO
  1468. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_CanApprove] DEFAULT ((0)) FOR [ApproveAllDepts]
  1469. GO
  1470. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_ApproveRequired] DEFAULT ((0)) FOR [ApproveRequired]
  1471. GO
  1472. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_ShowInLocationsWeb] DEFAULT ((0)) FOR [ShowInLocationsWeb]
  1473. GO
  1474. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isDisplayedWeb] DEFAULT ((1)) FOR [isDisplayedWeb]
  1475. GO
  1476. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1477. GO
  1478. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_isManager] DEFAULT ((0)) FOR [isManager]
  1479. GO
  1480. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_TermDealsOutstanding] DEFAULT ((0)) FOR [TermDealsOutstanding]
  1481. GO
  1482. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_PendingHireTerm] DEFAULT ((0)) FOR [PendingHireTerm]
  1483. GO
  1484. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_IsContract] DEFAULT ((0)) FOR [IsContract]
  1485. GO
  1486. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_CanDelete] DEFAULT ((0)) FOR [CanDelete]
  1487. GO
  1488. ALTER TABLE [dbo].[Employees] ADD CONSTRAINT [DF_Employees_WebAddressMode] DEFAULT ((0)) FOR [WebAddressMode]
  1489. GO
  1490. ALTER TABLE [dbo].[Employees] ADD DEFAULT ((0)) FOR [IsMediaContact]
  1491. GO
  1492. ALTER TABLE [dbo].[InvestorTypes] ADD CONSTRAINT [DF_InvestorTypes_isNationalAccount] DEFAULT ((0)) FOR [isNationalAccount]
  1493. GO
  1494. ALTER TABLE [dbo].[InvestorTypes] ADD CONSTRAINT [DF_InvestorTypes_IsCMBS] DEFAULT ((0)) FOR [IsCMBS]
  1495. GO
  1496. ALTER TABLE [dbo].[InvestorTypes] ADD CONSTRAINT [DF_InvestorTypes_IsImport] DEFAULT ((0)) FOR [IsImport]
  1497. GO
  1498. ALTER TABLE [dbo].[Offices] ADD CONSTRAINT [DF_Offices_isActive] DEFAULT ((0)) FOR [isActive]
  1499. GO
  1500. ALTER TABLE [dbo].[Offices] ADD CONSTRAINT [DF_Offices_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1501. GO
  1502. ALTER TABLE [dbo].[Offices] ADD CONSTRAINT [DF_Offices_WebOptions] DEFAULT ((3)) FOR [Options]
  1503. GO
  1504. ALTER TABLE [dbo].[PropertyTypeGroups] ADD CONSTRAINT [DF_PropertyTypeGroups_Options] DEFAULT ((0)) FOR [Options]
  1505. GO
  1506. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_IsOtherMarketing] DEFAULT ((0)) FOR [IsOtherMarketing]
  1507. GO
  1508. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_DateCreated] DEFAULT (getdate()) FOR [DateCreated]
  1509. GO
  1510. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_ValidationGroupID] DEFAULT ((0)) FOR [ValidationGroupID]
  1511. GO
  1512. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_RequiresSubType] DEFAULT ((0)) FOR [RequiresSubType]
  1513. GO
  1514. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_Options] DEFAULT ((0)) FOR [Options]
  1515. GO
  1516. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_ShowOnBusCardProfile] DEFAULT ((1)) FOR [ShowOnBusCardProfile]
  1517. GO
  1518. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_ShowOnWebSite] DEFAULT ((1)) FOR [ShowOnWebSite]
  1519. GO
  1520. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_SortWeb] DEFAULT ((0)) FOR [SortWeb]
  1521. GO
  1522. ALTER TABLE [dbo].[PropertyTypes] ADD CONSTRAINT [DF_PropertyTypes_SearchableOnWebsite] DEFAULT ((0)) FOR [IsSearchableOnWebsite]
  1523. GO
  1524. ALTER TABLE [dbo].[Regions] ADD CONSTRAINT [DF_Regions_IsRollupRegion] DEFAULT ((0)) FOR [IsRollupRegion]
  1525. GO
  1526. ALTER TABLE [dbo].[Regions] ADD CONSTRAINT [DF_Regions_IsForeign] DEFAULT ((0)) FOR [IsForeign]
  1527. GO
  1528. ALTER TABLE [dbo].[Regions] ADD CONSTRAINT [DF_Regions_RegionType] DEFAULT ((0)) FOR [RegionType]
  1529. GO
  1530. ALTER TABLE [dbo].[States] ADD CONSTRAINT [DF_States_isFixup] DEFAULT ((0)) FOR [isFixup]
  1531. GO
  1532. ALTER TABLE [dbo].[States] ADD CONSTRAINT [DF_States_ShowRELicenseText] DEFAULT ((0)) FOR [ShowRELicenseText]
  1533. GO
  1534. ALTER TABLE [dbo].[States] ADD CONSTRAINT [DF_States_RELicenseShowNonLicTeam] DEFAULT ((0)) FOR [RELicenseHideNonLicTeam]
  1535. GO
  1536. ALTER TABLE [dbo].[States] ADD CONSTRAINT [DF_States_ShowRELicenseTextHFFS] DEFAULT ((0)) FOR [ShowRELicenseTextHFFS]
  1537. GO
  1538. ALTER TABLE [dbo].[States] ADD CONSTRAINT [DF_States_ShowLicenseTextInAll] DEFAULT ((0)) FOR [ShowRELicenseTextInAll]
  1539. GO
  1540. ALTER TABLE [dbo].[Assets] WITH CHECK ADD CONSTRAINT [FK_Assets_PropertyTypes] FOREIGN KEY([PropertyTypeID])
  1541. REFERENCES [dbo].[PropertyTypes] ([PropertyTypeID])
  1542. GO
  1543. ALTER TABLE [dbo].[Assets] CHECK CONSTRAINT [FK_Assets_PropertyTypes]
  1544. GO
  1545. ALTER TABLE [dbo].[Assets] WITH CHECK ADD CONSTRAINT [FK_Assets_PropertyTypeUnits] FOREIGN KEY([PropertyUnitType])
  1546. REFERENCES [dbo].[PropertyTypeUnits] ([UnitID])
  1547. GO
  1548. ALTER TABLE [dbo].[Assets] CHECK CONSTRAINT [FK_Assets_PropertyTypeUnits]
  1549. GO
  1550. ALTER TABLE [dbo].[Cities] WITH CHECK ADD CONSTRAINT [FK_Cities_Countries] FOREIGN KEY([CountryID])
  1551. REFERENCES [dbo].[Countries] ([CountryID])
  1552. GO
  1553. ALTER TABLE [dbo].[Cities] CHECK CONSTRAINT [FK_Cities_Countries]
  1554. GO
  1555. ALTER TABLE [dbo].[DealPlatforms] WITH CHECK ADD CONSTRAINT [FK_DealPlatforms_Departments] FOREIGN KEY([DepartmentID])
  1556. REFERENCES [dbo].[Departments] ([DepartmentID])
  1557. GO
  1558. ALTER TABLE [dbo].[DealPlatforms] CHECK CONSTRAINT [FK_DealPlatforms_Departments]
  1559. GO
  1560. ALTER TABLE [dbo].[Deals] WITH CHECK ADD CONSTRAINT [FK_Deals_DealStages] FOREIGN KEY([StageID])
  1561. REFERENCES [dbo].[DealStages] ([StageID])
  1562. GO
  1563. ALTER TABLE [dbo].[Deals] CHECK CONSTRAINT [FK_Deals_DealStages]
  1564. GO
  1565. ALTER TABLE [dbo].[Deals] WITH CHECK ADD CONSTRAINT [FK_Deals_DealTypes] FOREIGN KEY([DealTypeID])
  1566. REFERENCES [dbo].[DealTypes] ([DealTypeID])
  1567. GO
  1568. ALTER TABLE [dbo].[Deals] CHECK CONSTRAINT [FK_Deals_DealTypes]
  1569. GO
  1570. ALTER TABLE [dbo].[Deals] WITH CHECK ADD CONSTRAINT [FK_Deals_Offices] FOREIGN KEY([OfficeID])
  1571. REFERENCES [dbo].[Offices] ([OfficeID])
  1572. GO
  1573. ALTER TABLE [dbo].[Deals] CHECK CONSTRAINT [FK_Deals_Offices]
  1574. GO
  1575. ALTER TABLE [dbo].[DealsToClients] WITH CHECK ADD CONSTRAINT [FK_DealsToClients_Clients] FOREIGN KEY([ClientID])
  1576. REFERENCES [dbo].[Clients] ([ClientID])
  1577. GO
  1578. ALTER TABLE [dbo].[DealsToClients] CHECK CONSTRAINT [FK_DealsToClients_Clients]
  1579. GO
  1580. ALTER TABLE [dbo].[DealsToClients] WITH CHECK ADD CONSTRAINT [FK_DealsToClients_Deals] FOREIGN KEY([DealID])
  1581. REFERENCES [dbo].[Deals] ([DealID])
  1582. GO
  1583. ALTER TABLE [dbo].[DealsToClients] CHECK CONSTRAINT [FK_DealsToClients_Deals]
  1584. GO
  1585. ALTER TABLE [dbo].[DealsToClients] WITH CHECK ADD CONSTRAINT [FK_DealsToClients_InvestorTypes] FOREIGN KEY([InvestorTypeID])
  1586. REFERENCES [dbo].[InvestorTypes] ([InvestorTypeID])
  1587. GO
  1588. ALTER TABLE [dbo].[DealsToClients] CHECK CONSTRAINT [FK_DealsToClients_InvestorTypes]
  1589. GO
  1590. ALTER TABLE [dbo].[DealTypes] WITH NOCHECK ADD CONSTRAINT [FK_DealTypes_DealPlatforms] FOREIGN KEY([PlatformID])
  1591. REFERENCES [dbo].[DealPlatforms] ([PlatformID])
  1592. GO
  1593. ALTER TABLE [dbo].[DealTypes] CHECK CONSTRAINT [FK_DealTypes_DealPlatforms]
  1594. GO
  1595. ALTER TABLE [dbo].[DealTypes] WITH CHECK ADD CONSTRAINT [FK_DealTypes_DealTypeGroups] FOREIGN KEY([TransactionTypeID])
  1596. REFERENCES [dbo].[DealTransactionTypes] ([TransactionTypeID])
  1597. GO
  1598. ALTER TABLE [dbo].[DealTypes] CHECK CONSTRAINT [FK_DealTypes_DealTypeGroups]
  1599. GO
  1600. ALTER TABLE [dbo].[DealTypes] WITH CHECK ADD CONSTRAINT [FK_DealVolumeRuleTypes_DealTypes] FOREIGN KEY([VolumeRuleTypeID])
  1601. REFERENCES [dbo].[DealVolumeRuleTypes] ([VolumeRuleTypeID])
  1602. GO
  1603. ALTER TABLE [dbo].[DealTypes] CHECK CONSTRAINT [FK_DealVolumeRuleTypes_DealTypes]
  1604. GO
  1605. ALTER TABLE [dbo].[Employees] WITH CHECK ADD CONSTRAINT [FK_Employees_Employees] FOREIGN KEY([SupervisorID])
  1606. REFERENCES [dbo].[Employees] ([EmployeeID])
  1607. GO
  1608. ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Employees]
  1609. GO
  1610. ALTER TABLE [dbo].[Employees] WITH CHECK ADD CONSTRAINT [FK_Employees_Employees1] FOREIGN KEY([AssistantID])
  1611. REFERENCES [dbo].[Employees] ([EmployeeID])
  1612. GO
  1613. ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Employees1]
  1614. GO
  1615. ALTER TABLE [dbo].[Offices] WITH CHECK ADD CONSTRAINT [FK_Offices_Employees] FOREIGN KEY([OfficeAdminID])
  1616. REFERENCES [dbo].[Employees] ([EmployeeID])
  1617. GO
  1618. ALTER TABLE [dbo].[Offices] CHECK CONSTRAINT [FK_Offices_Employees]
  1619. GO
  1620. ALTER TABLE [dbo].[PropertyTypes] WITH NOCHECK ADD CONSTRAINT [FK_PropertyTypes_PropertyTypeGroups] FOREIGN KEY([GroupID])
  1621. REFERENCES [dbo].[PropertyTypeGroups] ([GroupID])
  1622. GO
  1623. ALTER TABLE [dbo].[PropertyTypes] CHECK CONSTRAINT [FK_PropertyTypes_PropertyTypeGroups]
  1624. GO
  1625. ALTER TABLE [dbo].[PropertyTypes] WITH CHECK ADD CONSTRAINT [FK_PropertyTypes_PropertyTypes] FOREIGN KEY([ParentID])
  1626. REFERENCES [dbo].[PropertyTypes] ([PropertyTypeID])
  1627. GO
  1628. ALTER TABLE [dbo].[PropertyTypes] CHECK CONSTRAINT [FK_PropertyTypes_PropertyTypes]
  1629. GO
  1630. ALTER TABLE [dbo].[PropertyTypes] WITH CHECK ADD CONSTRAINT [FK_PropertyTypes_PublicPropertyTypes] FOREIGN KEY([PublicPropertyTypeID])
  1631. REFERENCES [dbo].[PublicPropertyTypes] ([PublicPropertyTypeID])
  1632. GO
  1633. ALTER TABLE [dbo].[PropertyTypes] CHECK CONSTRAINT [FK_PropertyTypes_PublicPropertyTypes]
  1634. GO
  1635. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'New Financing = 0, Cash = 1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DealProperties', @level2type=N'COLUMN',@level2name=N'Financing'
  1636. GO
  1637. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Debt - Percentage' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'ClosingRate'
  1638. GO
  1639. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Oroginal Contract amount (IS Only)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'OrigContractAmt'
  1640. GO
  1641. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Marketing Date (IS Only)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'MarketingDate'
  1642. GO
  1643. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date Cuttoff For All Offers (IS Only)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'OfferCutoffDate'
  1644. GO
  1645. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Compensation (IS Only for RFP - free-form entry)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'RFPCompensation'
  1646. GO
  1647. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Indemnity Cap (IS Only - Used on RFP)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'IndemnityCap'
  1648. GO
  1649. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Pitch Date (IS Only)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'PitchDate'
  1650. GO
  1651. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Total Capitalization' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'TotalCap'
  1652. GO
  1653. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Bitwise Summary of Deal docs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'DealDocs'
  1654. GO
  1655. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Rolled up property addresses - populated by triggers.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Deals', @level2type=N'COLUMN',@level2name=N'PropertyLocations'
  1656. GO
  1657. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Override for Client Investor Type' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DealsToClients', @level2type=N'COLUMN',@level2name=N'InvestorTypeID'
  1658. GO
  1659. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 = Fixed, 1 = Floating' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DealTypes', @level2type=N'COLUMN',@level2name=N'FixedFloating'
  1660. GO
  1661. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 = PhysicalThenLogicalOffice, 1 = LogicalOnly, 2 = Both' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Employees', @level2type=N'COLUMN',@level2name=N'WebAddressMode'
  1662. GO
  1663. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of unit (e.g. SQ FT, ACRE, UNIT)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PropertyTypes', @level2type=N'COLUMN',@level2name=N'UnitType'
  1664. GO
  1665. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1 = Normal, 2 = RCA' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Regions', @level2type=N'COLUMN',@level2name=N'RegionType'
  1666. GO
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×