Advertisement
Guest User

SQL Cresate Script

a guest
Jan 10th, 2020
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 37.82 KB | None | 0 0
  1. CREATE TABLE [dbo].[tblAS0002](
  2.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  3.     [ShortName] [nvarchar](40) NOT NULL,
  4.     [NUMBER] [nvarchar](20) NOT NULL,
  5.     [Name1] [nvarchar](60) NULL,
  6.     [Name2] [nvarchar](60) NULL,
  7.     [Name3] [nvarchar](60) NULL,
  8.     [Department] [nvarchar](60) NULL,
  9.     [FUNCTION] [nvarchar](60) NULL,
  10.     [NameSalutation] [nvarchar](30) NULL,
  11.     [NameTitle] [nvarchar](30) NULL,
  12.     [NameFirst] [nvarchar](30) NULL,
  13.     [NameLast] [nvarchar](50) NULL,
  14.     [Country] [nvarchar](3) NULL,
  15.     [State] [nvarchar](3) NULL,
  16.     [ZipCode] [nvarchar](10) NULL,
  17.     [City] [nvarchar](40) NULL,
  18.     [Street] [nvarchar](40) NULL,
  19.     [POBoxZipCode] [nvarchar](10) NULL,
  20.     [POBoxCity] [nvarchar](40) NULL,
  21.     [POBox] [nvarchar](40) NULL,
  22.     [Salutation] [nvarchar](80) NULL,
  23.     [CommPhoneOffice] [nvarchar](25) NULL,
  24.     [CommPhoneCentral] [nvarchar](25) NULL,
  25.     [CommPhoneMobil] [nvarchar](25) NULL,
  26.     [CommFaxOffice] [nvarchar](25) NULL,
  27.     [CommPhonePrivat] [nvarchar](25) NULL,
  28.     [CommFaxPrivat] [nvarchar](25) NULL,
  29.     [CommPhone1] [nvarchar](25) NULL,
  30.     [CommPhone1Text] [nvarchar](20) NULL,
  31.     [CommPhone2] [nvarchar](25) NULL,
  32.     [CommPhone2Text] [nvarchar](20) NULL,
  33.     [CommPhone3] [nvarchar](25) NULL,
  34.     [CommPhone3Text] [nvarchar](20) NULL,
  35.     [CommEMail1] [nvarchar](255) NULL,
  36.     [CommEMail2] [nvarchar](255) NULL,
  37.     [CommEMail3] [nvarchar](255) NULL,
  38.     [CommInternet] [nvarchar](255) NULL,
  39.     [NameSwap] [tinyint] NULL,
  40.     [StopHierarchy] [tinyint] NULL,
  41.     [IdParent] [INT] NULL,
  42.     [IdUserCreate] [INT] NOT NULL,
  43.     [TimeCreate] [datetime] NOT NULL,
  44.     [IdUserModify] [INT] NULL,
  45.     [TimeModify] [datetime] NULL,
  46.     [SyncDate] [datetime] NULL,
  47.     [UID] [uniqueidentifier] NOT NULL,
  48.     [Street2] [nvarchar](40) NULL,
  49.     [OptInEmail] [tinyint] NULL,
  50.     [OptInPhone] [tinyint] NULL,
  51.     [OptInLetter] [tinyint] NULL,
  52.     [OptInSMS] [tinyint] NULL,
  53.     [OptInFax] [tinyint] NULL,
  54.     [DegreeOfLatitude] [FLOAT] NULL,
  55.     [DegreeOfLongitude] [FLOAT] NULL,
  56.     [CoordinateQuality] [INT] NULL
  57. PRIMARY KEY CLUSTERED
  58. (
  59.     [Id] ASC
  60. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  61. ) ON [PRIMARY]
  62. GO
  63. /****** Object:  Table [dbo].[tblAS0002_EX0006]    Script Date: 10.01.2020 12:55:32 ******/
  64. SET ANSI_NULLS ON
  65. GO
  66. SET QUOTED_IDENTIFIER ON
  67. GO
  68. CREATE TABLE [dbo].[tblAS0002_EX0006](
  69.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  70.     [IdAddress] [INT] NOT NULL,
  71.     [IdUserCreate] [INT] NOT NULL,
  72.     [TimeCreate] [datetime] NOT NULL,
  73.     [IdUserModify] [INT] NULL,
  74.     [TimeModify] [datetime] NULL,
  75.     [UID] [uniqueidentifier] NOT NULL
  76. PRIMARY KEY CLUSTERED
  77. (
  78.     [Id] ASC
  79. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  80. ) ON [PRIMARY]
  81. GO
  82. /****** Object:  Table [dbo].[tblAS0002_EX0007]    Script Date: 10.01.2020 12:55:32 ******/
  83. SET ANSI_NULLS ON
  84. GO
  85. SET QUOTED_IDENTIFIER ON
  86. GO
  87. CREATE TABLE [dbo].[tblAS0002_EX0007](
  88.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  89.     [IdAddress] [INT] NOT NULL,
  90.     [IdUserCreate] [INT] NOT NULL,
  91.     [TimeCreate] [datetime] NOT NULL,
  92.     [IdUserModify] [INT] NULL,
  93.     [TimeModify] [datetime] NULL,
  94.     [UID] [uniqueidentifier] NOT NULL
  95. PRIMARY KEY CLUSTERED
  96. (
  97.     [Id] ASC
  98. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  99. ) ON [PRIMARY]
  100. GO
  101. /****** Object:  Table [dbo].[tblAS0002_EX0008]    Script Date: 10.01.2020 12:55:32 ******/
  102. SET ANSI_NULLS ON
  103. GO
  104. SET QUOTED_IDENTIFIER ON
  105. GO
  106. CREATE TABLE [dbo].[tblAS0002_EX0008](
  107.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  108.     [IdAddress] [INT] NOT NULL,
  109.     [IdUserCreate] [INT] NOT NULL,
  110.     [TimeCreate] [datetime] NOT NULL,
  111.     [IdUserModify] [INT] NULL,
  112.     [TimeModify] [datetime] NULL,
  113.     [UID] [uniqueidentifier] NOT NULL
  114. PRIMARY KEY CLUSTERED
  115. (
  116.     [Id] ASC
  117. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  118. ) ON [PRIMARY]
  119. GO
  120. /****** Object:  Table [dbo].[tblAS0002_History]    Script Date: 10.01.2020 12:55:32 ******/
  121. SET ANSI_NULLS ON
  122. GO
  123. SET QUOTED_IDENTIFIER ON
  124. GO
  125. CREATE TABLE [dbo].[tblAS0002_History](
  126.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  127.     [IdAddress] [INT] NULL,
  128.     [IdProject] [INT] NULL,
  129.     [IdTicket] [INT] NULL,
  130.     [IdState] [INT] NULL,
  131.     [IdStateNext] [INT] NULL,
  132.     [TYPE] [INT] NOT NULL,
  133.     [CommMedia] [INT] NOT NULL,
  134.     [CommMediaInOut] [INT] NOT NULL,
  135.     [STATUS] [INT] NOT NULL,
  136.     [CallStatus] [INT] NOT NULL,
  137.     [CallDuration] [INT] NOT NULL,
  138.     [UsageCount] [INT] NOT NULL,
  139.     [CommunicationNumber] [nvarchar](60) NULL,
  140.     [IdUser] [INT] NULL,
  141.     [TIME] [datetime] NOT NULL,
  142.     [TimeExpiration] [datetime] NULL,
  143.     [File] [nvarchar](255) NULL,
  144.     [Text] [nvarchar](2048) NULL,
  145.     [IdUserCreate] [INT] NOT NULL,
  146.     [TimeCreate] [datetime] NOT NULL,
  147.     [IdUserModify] [INT] NULL,
  148.     [TimeModify] [datetime] NULL,
  149.     [UID] [uniqueidentifier] NOT NULL,
  150.     [IdCost] [INT] NULL,
  151.     [CostIntern] [FLOAT] NOT NULL,
  152.     [CostExtern] [FLOAT] NOT NULL,
  153.     [TransitionType] [INT] NOT NULL,
  154.     [TotalDuration] [INT] NOT NULL,
  155.     [IdPhase] [INT] NULL
  156. PRIMARY KEY CLUSTERED
  157. (
  158.     [Id] ASC
  159. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  160. ) ON [PRIMARY]
  161. GO
  162. /****** Object:  Table [dbo].[tblAS0002_History_Links]    Script Date: 10.01.2020 12:55:32 ******/
  163. SET ANSI_NULLS ON
  164. GO
  165. SET QUOTED_IDENTIFIER ON
  166. GO
  167. CREATE TABLE [dbo].[tblAS0002_History_Links](
  168.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  169.     [IdHistory] [INT] NOT NULL,
  170.     [IdAddress] [INT] NULL,
  171.     [IdUser] [INT] NULL,
  172.     [UID] [uniqueidentifier] NOT NULL
  173. PRIMARY KEY CLUSTERED
  174. (
  175.     [Id] ASC
  176. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  177. ) ON [PRIMARY]
  178. GO
  179. /****** Object:  Table [dbo].[tblAS0002_PhoneIdx]    Script Date: 10.01.2020 12:55:32 ******/
  180. SET ANSI_NULLS ON
  181. GO
  182. SET QUOTED_IDENTIFIER ON
  183. GO
  184. CREATE TABLE [dbo].[tblAS0002_PhoneIdx](
  185.     [Id] [INT] NOT NULL,
  186.     [Phonenumber] [nvarchar](60) NULL
  187. ) ON [PRIMARY]
  188. GO
  189. /****** Object:  Table [dbo].[tblAS0002_PJ0002]    Script Date: 10.01.2020 12:55:32 ******/
  190. SET ANSI_NULLS ON
  191. GO
  192. SET QUOTED_IDENTIFIER ON
  193. GO
  194. CREATE TABLE [dbo].[tblAS0002_PJ0002](
  195.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  196.     [IdAddress] [INT] NOT NULL,
  197.     [IdState] [INT] NULL,
  198.     [IdStateLast] [INT] NULL,
  199.     [TimeTicket] [datetime] NOT NULL,
  200.     [FollowUpPriority] [INT] NULL,
  201.     [IdFollowUpUser] [INT] NULL,
  202.     [IdLastOp] [INT] NULL,
  203.     [UsageCount] [INT] NULL,
  204.     [TotalDuration] [INT] NULL,
  205.     [IdUserCreate] [INT] NOT NULL,
  206.     [TimeCreate] [datetime] NOT NULL,
  207.     [IdUserModify] [INT] NULL,
  208.     [TimeModify] [datetime] NULL,
  209.     [UID] [uniqueidentifier] NOT NULL,
  210.     [TimeTicketIntervalStart] [datetime] NULL,
  211.     [TimeTicketIntervalEnd] [datetime] NULL,
  212.     [TimeTicketIntervalWeekday] [INT] NULL,
  213.     [FollowUpCommField] [INT] NULL,
  214.     [TicketDescription] [nvarchar](255) NULL
  215. PRIMARY KEY CLUSTERED
  216. (
  217.     [Id] ASC
  218. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  219. ) ON [PRIMARY]
  220. GO
  221. /****** Object:  Table [dbo].[tblAS0002_PJ0002_PhoneIdx]    Script Date: 10.01.2020 12:55:32 ******/
  222. SET ANSI_NULLS ON
  223. GO
  224. SET QUOTED_IDENTIFIER ON
  225. GO
  226. CREATE TABLE [dbo].[tblAS0002_PJ0002_PhoneIdx](
  227.     [Id] [INT] NOT NULL,
  228.     [Phonenumber] [nvarchar](60) NULL
  229. ) ON [PRIMARY]
  230. GO
  231. /****** Object:  Table [dbo].[tblAS0002_PJ0004]    Script Date: 10.01.2020 12:55:32 ******/
  232. SET ANSI_NULLS ON
  233. GO
  234. SET QUOTED_IDENTIFIER ON
  235. GO
  236. CREATE TABLE [dbo].[tblAS0002_PJ0004](
  237.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  238.     [IdAddress] [INT] NOT NULL,
  239.     [IdState] [INT] NULL,
  240.     [IdStateLast] [INT] NULL,
  241.     [TimeTicket] [datetime] NOT NULL,
  242.     [FollowUpPriority] [INT] NULL,
  243.     [IdFollowUpUser] [INT] NULL,
  244.     [IdLastOp] [INT] NULL,
  245.     [UsageCount] [INT] NULL,
  246.     [TotalDuration] [INT] NULL,
  247.     [IdUserCreate] [INT] NOT NULL,
  248.     [TimeCreate] [datetime] NOT NULL,
  249.     [IdUserModify] [INT] NULL,
  250.     [TimeModify] [datetime] NULL,
  251.     [UID] [uniqueidentifier] NOT NULL,
  252.     [TimeTicketIntervalStart] [datetime] NULL,
  253.     [TimeTicketIntervalEnd] [datetime] NULL,
  254.     [TimeTicketIntervalWeekday] [INT] NULL,
  255.     [FollowUpCommField] [INT] NULL,
  256.     [TicketDescription] [nvarchar](255) NULL
  257. PRIMARY KEY CLUSTERED
  258. (
  259.     [Id] ASC
  260. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  261. ) ON [PRIMARY]
  262. GO
  263. /****** Object:  Table [dbo].[tblAS0002_PJ0004_PhoneIdx]    Script Date: 10.01.2020 12:55:32 ******/
  264. SET ANSI_NULLS ON
  265. GO
  266. SET QUOTED_IDENTIFIER ON
  267. GO
  268. CREATE TABLE [dbo].[tblAS0002_PJ0004_PhoneIdx](
  269.     [Id] [INT] NOT NULL,
  270.     [Phonenumber] [nvarchar](60) NULL
  271. ) ON [PRIMARY]
  272. GO
  273. /****** Object:  Table [dbo].[tblAS0002_PJ0006]    Script Date: 10.01.2020 12:55:32 ******/
  274. SET ANSI_NULLS ON
  275. GO
  276. SET QUOTED_IDENTIFIER ON
  277. GO
  278. CREATE TABLE [dbo].[tblAS0002_PJ0006](
  279.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  280.     [IdAddress] [INT] NOT NULL,
  281.     [IdState] [INT] NULL,
  282.     [IdStateLast] [INT] NULL,
  283.     [TimeTicket] [datetime] NOT NULL,
  284.     [FollowUpPriority] [INT] NULL,
  285.     [IdFollowUpUser] [INT] NULL,
  286.     [IdLastOp] [INT] NULL,
  287.     [UsageCount] [INT] NULL,
  288.     [TotalDuration] [INT] NULL,
  289.     [IdUserCreate] [INT] NOT NULL,
  290.     [TimeCreate] [datetime] NOT NULL,
  291.     [IdUserModify] [INT] NULL,
  292.     [TimeModify] [datetime] NULL,
  293.     [UID] [uniqueidentifier] NOT NULL,
  294.     [TimeTicketIntervalStart] [datetime] NULL,
  295.     [TimeTicketIntervalEnd] [datetime] NULL,
  296.     [TimeTicketIntervalWeekday] [INT] NULL,
  297.     [FollowUpCommField] [INT] NULL,
  298.     [TicketDescription] [nvarchar](255) NULL
  299. PRIMARY KEY CLUSTERED
  300. (
  301.     [Id] ASC
  302. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  303. ) ON [PRIMARY]
  304. GO
  305. /****** Object:  Table [dbo].[tblAS0002_PJ0006_PhoneIdx]    Script Date: 10.01.2020 12:55:32 ******/
  306. SET ANSI_NULLS ON
  307. GO
  308. SET QUOTED_IDENTIFIER ON
  309. GO
  310. CREATE TABLE [dbo].[tblAS0002_PJ0006_PhoneIdx](
  311.     [Id] [INT] NOT NULL,
  312.     [Phonenumber] [nvarchar](60) NULL
  313. ) ON [PRIMARY]
  314. GO
  315. /****** Object:  Table [dbo].[tblAS0002_PJ0008]    Script Date: 10.01.2020 12:55:32 ******/
  316. SET ANSI_NULLS ON
  317. GO
  318. SET QUOTED_IDENTIFIER ON
  319. GO
  320. CREATE TABLE [dbo].[tblAS0002_PJ0008](
  321.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  322.     [IdAddress] [INT] NOT NULL,
  323.     [IdState] [INT] NULL,
  324.     [IdStateLast] [INT] NULL,
  325.     [TimeTicket] [datetime] NOT NULL,
  326.     [FollowUpPriority] [INT] NULL,
  327.     [IdFollowUpUser] [INT] NULL,
  328.     [IdLastOp] [INT] NULL,
  329.     [UsageCount] [INT] NULL,
  330.     [TotalDuration] [INT] NULL,
  331.     [IdUserCreate] [INT] NOT NULL,
  332.     [TimeCreate] [datetime] NOT NULL,
  333.     [IdUserModify] [INT] NULL,
  334.     [TimeModify] [datetime] NULL,
  335.     [UID] [uniqueidentifier] NOT NULL,
  336.     [TimeTicketIntervalStart] [datetime] NULL,
  337.     [TimeTicketIntervalEnd] [datetime] NULL,
  338.     [TimeTicketIntervalWeekday] [INT] NULL,
  339.     [FollowUpCommField] [INT] NULL,
  340.     [TicketDescription] [nvarchar](255) NULL
  341. PRIMARY KEY CLUSTERED
  342. (
  343.     [Id] ASC
  344. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  345. ) ON [PRIMARY]
  346. GO
  347. /****** Object:  Table [dbo].[tblAS0002_PJ0008_PhoneIdx]    Script Date: 10.01.2020 12:55:32 ******/
  348. SET ANSI_NULLS ON
  349. GO
  350. SET QUOTED_IDENTIFIER ON
  351. GO
  352. CREATE TABLE [dbo].[tblAS0002_PJ0008_PhoneIdx](
  353.     [Id] [INT] NOT NULL,
  354.     [Phonenumber] [nvarchar](60) NULL
  355. ) ON [PRIMARY]
  356. GO
  357. /****** Object:  Table [dbo].[tblAS0002_PS]    Script Date: 10.01.2020 12:55:32 ******/
  358. SET ANSI_NULLS ON
  359. GO
  360. SET QUOTED_IDENTIFIER ON
  361. GO
  362. CREATE TABLE [dbo].[tblAS0002_PS](
  363.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  364.     [IdCategory] [INT] NOT NULL,
  365.     [IdValue] [INT] NOT NULL,
  366.     [IdColumn] [INT] NOT NULL,
  367.     [IdAddress] [INT] NULL,
  368.     [IdProject] [INT] NULL,
  369.     [IdTicket] [INT] NULL,
  370.     [UID] [uniqueidentifier] NOT NULL
  371. PRIMARY KEY CLUSTERED
  372. (
  373.     [Id] ASC
  374. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  375. ) ON [PRIMARY]
  376. GO
  377. /****** Object:  Table [dbo].[tblAS0002_Rights]    Script Date: 10.01.2020 12:55:32 ******/
  378. SET ANSI_NULLS ON
  379. GO
  380. SET QUOTED_IDENTIFIER ON
  381. GO
  382. CREATE TABLE [dbo].[tblAS0002_Rights](
  383.     [Id] [INT] IDENTITY(1,1) NOT NULL,
  384.     [IdAddress] [INT] NOT NULL,
  385.     [IdUser] [INT] NOT NULL,
  386.     [UID] [uniqueidentifier] NOT NULL,
  387. PRIMARY KEY CLUSTERED
  388. (
  389.     [Id] ASC
  390. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  391. ) ON [PRIMARY]
  392. GO
  393. SET ANSI_PADDING ON
  394. GO
  395. /****** Object:  Index [idxAS0002_000002]    Script Date: 10.01.2020 12:55:32 ******/
  396. CREATE NONCLUSTERED INDEX [idxAS0002_000002] ON [dbo].[tblAS0002]
  397. (
  398.     [ShortName] ASC,
  399.     [Id] ASC
  400. )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]
  401. GO
  402. SET ANSI_PADDING ON
  403. GO
  404. /****** Object:  Index [idxAS0002_000003]    Script Date: 10.01.2020 12:55:32 ******/
  405. CREATE NONCLUSTERED INDEX [idxAS0002_000003] ON [dbo].[tblAS0002]
  406. (
  407.     [NUMBER] ASC,
  408.     [Id] ASC
  409. )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]
  410. GO
  411. SET ANSI_PADDING ON
  412. GO
  413. /****** Object:  Index [idxAS0002_000013]    Script Date: 10.01.2020 12:55:32 ******/
  414. CREATE NONCLUSTERED INDEX [idxAS0002_000013] ON [dbo].[tblAS0002]
  415. (
  416.     [Country] ASC
  417. )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]
  418. GO
  419. SET ANSI_PADDING ON
  420. GO
  421. /****** Object:  Index [idxAS0002_000015]    Script Date: 10.01.2020 12:55:32 ******/
  422. CREATE NONCLUSTERED INDEX [idxAS0002_000015] ON [dbo].[tblAS0002]
  423. (
  424.     [ZipCode] ASC
  425. )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]
  426. GO
  427. /****** Object:  Index [idxAS0002_EX0006_000902]    Script Date: 10.01.2020 12:55:32 ******/
  428. CREATE NONCLUSTERED INDEX [idxAS0002_EX0006_000902] ON [dbo].[tblAS0002_EX0006]
  429. (
  430.     [IdAddress] ASC
  431. )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]
  432. GO
  433. /****** Object:  Index [idxAS0002_EX0006_000908]    Script Date: 10.01.2020 12:55:32 ******/
  434. CREATE NONCLUSTERED INDEX [idxAS0002_EX0006_000908] ON [dbo].[tblAS0002_EX0006]
  435. (
  436.     [UID] ASC
  437. )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]
  438. GO
  439. /****** Object:  Index [idxAS0002_EX0007_000902]    Script Date: 10.01.2020 12:55:32 ******/
  440. CREATE NONCLUSTERED INDEX [idxAS0002_EX0007_000902] ON [dbo].[tblAS0002_EX0007]
  441. (
  442.     [IdAddress] ASC
  443. )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]
  444. GO
  445. /****** Object:  Index [idxAS0002_EX0007_000908]    Script Date: 10.01.2020 12:55:32 ******/
  446. CREATE NONCLUSTERED INDEX [idxAS0002_EX0007_000908] ON [dbo].[tblAS0002_EX0007]
  447. (
  448.     [UID] ASC
  449. )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]
  450. GO
  451. /****** Object:  Index [idxAS0002_EX0008_000902]    Script Date: 10.01.2020 12:55:32 ******/
  452. CREATE NONCLUSTERED INDEX [idxAS0002_EX0008_000902] ON [dbo].[tblAS0002_EX0008]
  453. (
  454.     [IdAddress] ASC
  455. )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]
  456. GO
  457. /****** Object:  Index [idxAS0002_EX0008_000908]    Script Date: 10.01.2020 12:55:32 ******/
  458. CREATE NONCLUSTERED INDEX [idxAS0002_EX0008_000908] ON [dbo].[tblAS0002_EX0008]
  459. (
  460.     [UID] ASC
  461. )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]
  462. GO
  463. /****** Object:  Index [idxAS0002_History_IdAddress]    Script Date: 10.01.2020 12:55:32 ******/
  464. CREATE NONCLUSTERED INDEX [idxAS0002_History_IdAddress] ON [dbo].[tblAS0002_History]
  465. (
  466.     [IdAddress] ASC
  467. )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]
  468. GO
  469. /****** Object:  Index [idxAS0002_History_ProjectTicket]    Script Date: 10.01.2020 12:55:32 ******/
  470. CREATE NONCLUSTERED INDEX [idxAS0002_History_ProjectTicket] ON [dbo].[tblAS0002_History]
  471. (
  472.     [IdProject] ASC,
  473.     [IdTicket] ASC
  474. )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]
  475. GO
  476. /****** Object:  Index [idxAS0002_History_UserType]    Script Date: 10.01.2020 12:55:32 ******/
  477. CREATE NONCLUSTERED INDEX [idxAS0002_History_UserType] ON [dbo].[tblAS0002_History]
  478. (
  479.     [IdUser] ASC,
  480.     [TYPE] ASC
  481. )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]
  482. GO
  483. /****** Object:  Index [idxAS0002_HA_Address]    Script Date: 10.01.2020 12:55:32 ******/
  484. CREATE NONCLUSTERED INDEX [idxAS0002_HA_Address] ON [dbo].[tblAS0002_History_Links]
  485. (
  486.     [IdAddress] ASC
  487. )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]
  488. GO
  489. /****** Object:  Index [idxAS0002_HA_HistoryAddressUser]    Script Date: 10.01.2020 12:55:32 ******/
  490. CREATE UNIQUE NONCLUSTERED INDEX [idxAS0002_HA_HistoryAddressUser] ON [dbo].[tblAS0002_History_Links]
  491. (
  492.     [IdHistory] ASC,
  493.     [IdAddress] ASC,
  494.     [IdUser] ASC
  495. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  496. GO
  497. /****** Object:  Index [idxAS0002_HA_User]    Script Date: 10.01.2020 12:55:32 ******/
  498. CREATE NONCLUSTERED INDEX [idxAS0002_HA_User] ON [dbo].[tblAS0002_History_Links]
  499. (
  500.     [IdUser] ASC
  501. )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]
  502. GO
  503. /****** Object:  Index [idxAS0002_PhoneIdx_Id]    Script Date: 10.01.2020 12:55:32 ******/
  504. CREATE NONCLUSTERED INDEX [idxAS0002_PhoneIdx_Id] ON [dbo].[tblAS0002_PhoneIdx]
  505. (
  506.     [Id] ASC
  507. )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]
  508. GO
  509. SET ANSI_PADDING ON
  510. GO
  511. /****** Object:  Index [idxAS0002_PhoneIdx_Phonenumber]    Script Date: 10.01.2020 12:55:32 ******/
  512. CREATE NONCLUSTERED INDEX [idxAS0002_PhoneIdx_Phonenumber] ON [dbo].[tblAS0002_PhoneIdx]
  513. (
  514.     [Phonenumber] ASC
  515. )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]
  516. GO
  517. /****** Object:  Index [idxAS0002_PJ0002_001002]    Script Date: 10.01.2020 12:55:32 ******/
  518. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_001002] ON [dbo].[tblAS0002_PJ0002]
  519. (
  520.     [IdAddress] ASC
  521. )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]
  522. GO
  523. /****** Object:  Index [idxAS0002_PJ0002_001008]    Script Date: 10.01.2020 12:55:32 ******/
  524. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_001008] ON [dbo].[tblAS0002_PJ0002]
  525. (
  526.     [IdLastOp] ASC
  527. )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]
  528. GO
  529. /****** Object:  Index [idxAS0002_PJ0002_001015]    Script Date: 10.01.2020 12:55:32 ******/
  530. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_001015] ON [dbo].[tblAS0002_PJ0002]
  531. (
  532.     [UID] ASC
  533. )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]
  534. GO
  535. /****** Object:  Index [idxAS0002_PJ0002_Project_StatePriorityTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  536. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_Project_StatePriorityTimeIds] ON [dbo].[tblAS0002_PJ0002]
  537. (
  538.     [IdState] ASC,
  539.     [FollowUpPriority] ASC,
  540.     [TimeTicket] ASC,
  541.     [Id] ASC,
  542.     [IdFollowUpUser] ASC,
  543.     [IdAddress] ASC
  544. )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]
  545. GO
  546. /****** Object:  Index [idxAS0002_PJ0002_Project_StateTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  547. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_Project_StateTimeIds] ON [dbo].[tblAS0002_PJ0002]
  548. (
  549.     [IdState] ASC,
  550.     [TimeTicket] ASC,
  551.     [Id] ASC,
  552.     [IdFollowUpUser] ASC,
  553.     [FollowUpPriority] ASC,
  554.     [IdAddress] ASC
  555. )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]
  556. GO
  557. /****** Object:  Index [idxAS0002_PJ0002_Project_TimeFollowUp]    Script Date: 10.01.2020 12:55:32 ******/
  558. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_Project_TimeFollowUp] ON [dbo].[tblAS0002_PJ0002]
  559. (
  560.     [TimeTicket] ASC,
  561.     [IdFollowUpUser] ASC,
  562.     [FollowUpPriority] ASC
  563. )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]
  564. GO
  565. /****** Object:  Index [idxAS0002_PJ0002_PhoneIdx_Id]    Script Date: 10.01.2020 12:55:32 ******/
  566. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_PhoneIdx_Id] ON [dbo].[tblAS0002_PJ0002_PhoneIdx]
  567. (
  568.     [Id] ASC
  569. )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]
  570. GO
  571. SET ANSI_PADDING ON
  572. GO
  573. /****** Object:  Index [idxAS0002_PJ0002_PhoneIdx_Phonenumber]    Script Date: 10.01.2020 12:55:32 ******/
  574. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0002_PhoneIdx_Phonenumber] ON [dbo].[tblAS0002_PJ0002_PhoneIdx]
  575. (
  576.     [Phonenumber] ASC
  577. )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]
  578. GO
  579. /****** Object:  Index [idxAS0002_PJ0004_001002]    Script Date: 10.01.2020 12:55:32 ******/
  580. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_001002] ON [dbo].[tblAS0002_PJ0004]
  581. (
  582.     [IdAddress] ASC
  583. )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]
  584. GO
  585. /****** Object:  Index [idxAS0002_PJ0004_001008]    Script Date: 10.01.2020 12:55:32 ******/
  586. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_001008] ON [dbo].[tblAS0002_PJ0004]
  587. (
  588.     [IdLastOp] ASC
  589. )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]
  590. GO
  591. /****** Object:  Index [idxAS0002_PJ0004_001015]    Script Date: 10.01.2020 12:55:32 ******/
  592. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_001015] ON [dbo].[tblAS0002_PJ0004]
  593. (
  594.     [UID] ASC
  595. )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]
  596. GO
  597. /****** Object:  Index [idxAS0002_PJ0004_Project_StatePriorityTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  598. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_Project_StatePriorityTimeIds] ON [dbo].[tblAS0002_PJ0004]
  599. (
  600.     [IdState] ASC,
  601.     [FollowUpPriority] ASC,
  602.     [TimeTicket] ASC,
  603.     [Id] ASC,
  604.     [IdFollowUpUser] ASC,
  605.     [IdAddress] ASC
  606. )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]
  607. GO
  608. /****** Object:  Index [idxAS0002_PJ0004_Project_StateTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  609. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_Project_StateTimeIds] ON [dbo].[tblAS0002_PJ0004]
  610. (
  611.     [IdState] ASC,
  612.     [TimeTicket] ASC,
  613.     [Id] ASC,
  614.     [IdFollowUpUser] ASC,
  615.     [FollowUpPriority] ASC,
  616.     [IdAddress] ASC
  617. )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]
  618. GO
  619. /****** Object:  Index [idxAS0002_PJ0004_Project_TimeFollowUp]    Script Date: 10.01.2020 12:55:32 ******/
  620. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_Project_TimeFollowUp] ON [dbo].[tblAS0002_PJ0004]
  621. (
  622.     [TimeTicket] ASC,
  623.     [IdFollowUpUser] ASC,
  624.     [FollowUpPriority] ASC
  625. )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]
  626. GO
  627. /****** Object:  Index [idxAS0002_PJ0004_PhoneIdx_Id]    Script Date: 10.01.2020 12:55:32 ******/
  628. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_PhoneIdx_Id] ON [dbo].[tblAS0002_PJ0004_PhoneIdx]
  629. (
  630.     [Id] ASC
  631. )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]
  632. GO
  633. SET ANSI_PADDING ON
  634. GO
  635. /****** Object:  Index [idxAS0002_PJ0004_PhoneIdx_Phonenumber]    Script Date: 10.01.2020 12:55:32 ******/
  636. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0004_PhoneIdx_Phonenumber] ON [dbo].[tblAS0002_PJ0004_PhoneIdx]
  637. (
  638.     [Phonenumber] ASC
  639. )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]
  640. GO
  641. /****** Object:  Index [idxAS0002_PJ0006_001002]    Script Date: 10.01.2020 12:55:32 ******/
  642. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_001002] ON [dbo].[tblAS0002_PJ0006]
  643. (
  644.     [IdAddress] ASC
  645. )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]
  646. GO
  647. /****** Object:  Index [idxAS0002_PJ0006_001008]    Script Date: 10.01.2020 12:55:32 ******/
  648. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_001008] ON [dbo].[tblAS0002_PJ0006]
  649. (
  650.     [IdLastOp] ASC
  651. )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]
  652. GO
  653. /****** Object:  Index [idxAS0002_PJ0006_001015]    Script Date: 10.01.2020 12:55:32 ******/
  654. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_001015] ON [dbo].[tblAS0002_PJ0006]
  655. (
  656.     [UID] ASC
  657. )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]
  658. GO
  659. /****** Object:  Index [idxAS0002_PJ0006_Project_StatePriorityTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  660. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_Project_StatePriorityTimeIds] ON [dbo].[tblAS0002_PJ0006]
  661. (
  662.     [IdState] ASC,
  663.     [FollowUpPriority] ASC,
  664.     [TimeTicket] ASC,
  665.     [Id] ASC,
  666.     [IdFollowUpUser] ASC,
  667.     [IdAddress] ASC
  668. )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]
  669. GO
  670. /****** Object:  Index [idxAS0002_PJ0006_Project_StateTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  671. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_Project_StateTimeIds] ON [dbo].[tblAS0002_PJ0006]
  672. (
  673.     [IdState] ASC,
  674.     [TimeTicket] ASC,
  675.     [Id] ASC,
  676.     [IdFollowUpUser] ASC,
  677.     [FollowUpPriority] ASC,
  678.     [IdAddress] ASC
  679. )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]
  680. GO
  681. /****** Object:  Index [idxAS0002_PJ0006_Project_TimeFollowUp]    Script Date: 10.01.2020 12:55:32 ******/
  682. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_Project_TimeFollowUp] ON [dbo].[tblAS0002_PJ0006]
  683. (
  684.     [TimeTicket] ASC,
  685.     [IdFollowUpUser] ASC,
  686.     [FollowUpPriority] ASC
  687. )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]
  688. GO
  689. /****** Object:  Index [idxAS0002_PJ0006_PhoneIdx_Id]    Script Date: 10.01.2020 12:55:32 ******/
  690. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_PhoneIdx_Id] ON [dbo].[tblAS0002_PJ0006_PhoneIdx]
  691. (
  692.     [Id] ASC
  693. )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]
  694. GO
  695. SET ANSI_PADDING ON
  696. GO
  697. /****** Object:  Index [idxAS0002_PJ0006_PhoneIdx_Phonenumber]    Script Date: 10.01.2020 12:55:32 ******/
  698. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0006_PhoneIdx_Phonenumber] ON [dbo].[tblAS0002_PJ0006_PhoneIdx]
  699. (
  700.     [Phonenumber] ASC
  701. )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]
  702. GO
  703. /****** Object:  Index [idxAS0002_PJ0008_001002]    Script Date: 10.01.2020 12:55:32 ******/
  704. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_001002] ON [dbo].[tblAS0002_PJ0008]
  705. (
  706.     [IdAddress] ASC
  707. )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]
  708. GO
  709. /****** Object:  Index [idxAS0002_PJ0008_001008]    Script Date: 10.01.2020 12:55:32 ******/
  710. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_001008] ON [dbo].[tblAS0002_PJ0008]
  711. (
  712.     [IdLastOp] ASC
  713. )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]
  714. GO
  715. /****** Object:  Index [idxAS0002_PJ0008_001015]    Script Date: 10.01.2020 12:55:32 ******/
  716. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_001015] ON [dbo].[tblAS0002_PJ0008]
  717. (
  718.     [UID] ASC
  719. )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]
  720. GO
  721. /****** Object:  Index [idxAS0002_PJ0008_Project_StatePriorityTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  722. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_Project_StatePriorityTimeIds] ON [dbo].[tblAS0002_PJ0008]
  723. (
  724.     [IdState] ASC,
  725.     [FollowUpPriority] ASC,
  726.     [TimeTicket] ASC,
  727.     [Id] ASC,
  728.     [IdFollowUpUser] ASC,
  729.     [IdAddress] ASC
  730. )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]
  731. GO
  732. /****** Object:  Index [idxAS0002_PJ0008_Project_StateTimeIds]    Script Date: 10.01.2020 12:55:32 ******/
  733. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_Project_StateTimeIds] ON [dbo].[tblAS0002_PJ0008]
  734. (
  735.     [IdState] ASC,
  736.     [TimeTicket] ASC,
  737.     [Id] ASC,
  738.     [IdFollowUpUser] ASC,
  739.     [FollowUpPriority] ASC,
  740.     [IdAddress] ASC
  741. )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]
  742. GO
  743. /****** Object:  Index [idxAS0002_PJ0008_Project_TimeFollowUp]    Script Date: 10.01.2020 12:55:32 ******/
  744. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_Project_TimeFollowUp] ON [dbo].[tblAS0002_PJ0008]
  745. (
  746.     [TimeTicket] ASC,
  747.     [IdFollowUpUser] ASC,
  748.     [FollowUpPriority] ASC
  749. )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]
  750. GO
  751. /****** Object:  Index [idxAS0002_PJ0008_PhoneIdx_Id]    Script Date: 10.01.2020 12:55:32 ******/
  752. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_PhoneIdx_Id] ON [dbo].[tblAS0002_PJ0008_PhoneIdx]
  753. (
  754.     [Id] ASC
  755. )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]
  756. GO
  757. SET ANSI_PADDING ON
  758. GO
  759. /****** Object:  Index [idxAS0002_PJ0008_PhoneIdx_Phonenumber]    Script Date: 10.01.2020 12:55:32 ******/
  760. CREATE NONCLUSTERED INDEX [idxAS0002_PJ0008_PhoneIdx_Phonenumber] ON [dbo].[tblAS0002_PJ0008_PhoneIdx]
  761. (
  762.     [Phonenumber] ASC
  763. )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]
  764. GO
  765. /****** Object:  Index [idxAS0002_PS_Category]    Script Date: 10.01.2020 12:55:32 ******/
  766. CREATE NONCLUSTERED INDEX [idxAS0002_PS_Category] ON [dbo].[tblAS0002_PS]
  767. (
  768.     [IdCategory] ASC
  769. )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]
  770. GO
  771. /****** Object:  Index [idxAS0002_PS_ColValAddrTicket]    Script Date: 10.01.2020 12:55:32 ******/
  772. CREATE UNIQUE NONCLUSTERED INDEX [idxAS0002_PS_ColValAddrTicket] ON [dbo].[tblAS0002_PS]
  773. (
  774.     [IdColumn] ASC,
  775.     [IdValue] ASC,
  776.     [IdAddress] ASC,
  777.     [IdTicket] ASC
  778. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  779. GO
  780. /****** Object:  Index [idxAS0002_PS_IdAddress]    Script Date: 10.01.2020 12:55:32 ******/
  781. CREATE NONCLUSTERED INDEX [idxAS0002_PS_IdAddress] ON [dbo].[tblAS0002_PS]
  782. (
  783.     [IdAddress] ASC
  784. )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]
  785. GO
  786. /****** Object:  Index [idxAS0002_Rights_AddressUser]    Script Date: 10.01.2020 12:55:32 ******/
  787. CREATE UNIQUE NONCLUSTERED INDEX [idxAS0002_Rights_AddressUser] ON [dbo].[tblAS0002_Rights]
  788. (
  789.     [IdAddress] ASC,
  790.     [IdUser] ASC
  791. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  792. GO
  793. ALTER TABLE [dbo].[tblAS0002]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_IdParent] FOREIGN KEY([IdParent])
  794. REFERENCES [dbo].[tblAS0002] ([Id])
  795. GO
  796. ALTER TABLE [dbo].[tblAS0002] CHECK CONSTRAINT [FK_AS0002_IdParent]
  797. GO
  798. ALTER TABLE [dbo].[tblAS0002_EX0006]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_EX0006_IdAddress] FOREIGN KEY([IdAddress])
  799. REFERENCES [dbo].[tblAS0002] ([Id])
  800. ON DELETE CASCADE
  801. GO
  802. ALTER TABLE [dbo].[tblAS0002_EX0006] CHECK CONSTRAINT [FK_AS0002_EX0006_IdAddress]
  803. GO
  804. ALTER TABLE [dbo].[tblAS0002_EX0007]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_EX0007_IdAddress] FOREIGN KEY([IdAddress])
  805. REFERENCES [dbo].[tblAS0002] ([Id])
  806. ON DELETE CASCADE
  807. GO
  808. ALTER TABLE [dbo].[tblAS0002_EX0007] CHECK CONSTRAINT [FK_AS0002_EX0007_IdAddress]
  809. GO
  810. ALTER TABLE [dbo].[tblAS0002_EX0008]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_EX0008_IdAddress] FOREIGN KEY([IdAddress])
  811. REFERENCES [dbo].[tblAS0002] ([Id])
  812. ON DELETE CASCADE
  813. GO
  814. ALTER TABLE [dbo].[tblAS0002_EX0008] CHECK CONSTRAINT [FK_AS0002_EX0008_IdAddress]
  815. GO
  816. ALTER TABLE [dbo].[tblAS0002_History]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_History_IdAddress] FOREIGN KEY([IdAddress])
  817. REFERENCES [dbo].[tblAS0002] ([Id])
  818. ON DELETE CASCADE
  819. GO
  820. ALTER TABLE [dbo].[tblAS0002_History] CHECK CONSTRAINT [FK_AS0002_History_IdAddress]
  821. GO
  822. ALTER TABLE [dbo].[tblAS0002_History_Links]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_History_Links_IdAddress] FOREIGN KEY([IdAddress])
  823. REFERENCES [dbo].[tblAS0002] ([Id])
  824. GO
  825. ALTER TABLE [dbo].[tblAS0002_History_Links] CHECK CONSTRAINT [FK_AS0002_History_Links_IdAddress]
  826. GO
  827. ALTER TABLE [dbo].[tblAS0002_History_Links]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_History_Links_IdHistory] FOREIGN KEY([IdHistory])
  828. REFERENCES [dbo].[tblAS0002_History] ([Id])
  829. ON DELETE CASCADE
  830. GO
  831. ALTER TABLE [dbo].[tblAS0002_History_Links] CHECK CONSTRAINT [FK_AS0002_History_Links_IdHistory]
  832. GO
  833. ALTER TABLE [dbo].[tblAS0002_PhoneIdx]  WITH CHECK ADD FOREIGN KEY([Id])
  834. REFERENCES [dbo].[tblAS0002] ([Id])
  835. ON DELETE CASCADE
  836. GO
  837. ALTER TABLE [dbo].[tblAS0002_PJ0002]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_PJ0002_IdAddress] FOREIGN KEY([IdAddress])
  838. REFERENCES [dbo].[tblAS0002] ([Id])
  839. ON DELETE CASCADE
  840. GO
  841. ALTER TABLE [dbo].[tblAS0002_PJ0002] CHECK CONSTRAINT [FK_AS0002_PJ0002_IdAddress]
  842. GO
  843. ALTER TABLE [dbo].[tblAS0002_PJ0002_PhoneIdx]  WITH CHECK ADD FOREIGN KEY([Id])
  844. REFERENCES [dbo].[tblAS0002_PJ0002] ([Id])
  845. ON DELETE CASCADE
  846. GO
  847. ALTER TABLE [dbo].[tblAS0002_PJ0004]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_PJ0004_IdAddress] FOREIGN KEY([IdAddress])
  848. REFERENCES [dbo].[tblAS0002] ([Id])
  849. ON DELETE CASCADE
  850. GO
  851. ALTER TABLE [dbo].[tblAS0002_PJ0004] CHECK CONSTRAINT [FK_AS0002_PJ0004_IdAddress]
  852. GO
  853. ALTER TABLE [dbo].[tblAS0002_PJ0004_PhoneIdx]  WITH CHECK ADD FOREIGN KEY([Id])
  854. REFERENCES [dbo].[tblAS0002_PJ0004] ([Id])
  855. ON DELETE CASCADE
  856. GO
  857. ALTER TABLE [dbo].[tblAS0002_PJ0006]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_PJ0006_IdAddress] FOREIGN KEY([IdAddress])
  858. REFERENCES [dbo].[tblAS0002] ([Id])
  859. ON DELETE CASCADE
  860. GO
  861. ALTER TABLE [dbo].[tblAS0002_PJ0006] CHECK CONSTRAINT [FK_AS0002_PJ0006_IdAddress]
  862. GO
  863. ALTER TABLE [dbo].[tblAS0002_PJ0006_PhoneIdx]  WITH CHECK ADD FOREIGN KEY([Id])
  864. REFERENCES [dbo].[tblAS0002_PJ0006] ([Id])
  865. ON DELETE CASCADE
  866. GO
  867. ALTER TABLE [dbo].[tblAS0002_PJ0008]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_PJ0008_IdAddress] FOREIGN KEY([IdAddress])
  868. REFERENCES [dbo].[tblAS0002] ([Id])
  869. ON DELETE CASCADE
  870. GO
  871. ALTER TABLE [dbo].[tblAS0002_PJ0008] CHECK CONSTRAINT [FK_AS0002_PJ0008_IdAddress]
  872. GO
  873. ALTER TABLE [dbo].[tblAS0002_PJ0008_PhoneIdx]  WITH CHECK ADD FOREIGN KEY([Id])
  874. REFERENCES [dbo].[tblAS0002_PJ0008] ([Id])
  875. ON DELETE CASCADE
  876. GO
  877. ALTER TABLE [dbo].[tblAS0002_PS]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_PS_IdAddress] FOREIGN KEY([IdAddress])
  878. REFERENCES [dbo].[tblAS0002] ([Id])
  879. ON DELETE CASCADE
  880. GO
  881. ALTER TABLE [dbo].[tblAS0002_PS] CHECK CONSTRAINT [FK_AS0002_PS_IdAddress]
  882. GO
  883. ALTER TABLE [dbo].[tblAS0002_Rights]  WITH CHECK ADD  CONSTRAINT [FK_AS0002_Rights_IdAddress] FOREIGN KEY([IdAddress])
  884. REFERENCES [dbo].[tblAS0002] ([Id])
  885. ON DELETE CASCADE
  886. GO
  887. ALTER TABLE [dbo].[tblAS0002_Rights] CHECK CONSTRAINT [FK_AS0002_Rights_IdAddress]
  888. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement