lyfzModify.sql 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. --client±í;
  2. use [db]
  3. go
  4. IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[client]') AND name = N'id')
  5. DROP INDEX [id] ON [dbo].[client] WITH ( ONLINE = OFF )
  6. if not exists(select name from syscolumns where id=object_id('client') and name='photo')
  7. alter table [client] add [photo] [image] NULL
  8. alter table [client] alter column [id] [nvarchar] (50) NULL
  9. alter table [client] alter column [name1] [nvarchar] (50) NULL
  10. alter table [client] alter column [name2] [nvarchar] (50) NULL
  11. alter table [client] alter column [phone1] [nvarchar] (50) NULL
  12. alter table [client] alter column [phone2] [nvarchar] (50) NULL
  13. alter table [client] alter column [qq1] [nvarchar] (50) NULL
  14. alter table [client] alter column [qq2] [nvarchar] (50) NULL
  15. alter table [client] alter column [addr1] [nvarchar] (50) NULL
  16. alter table [client] alter column [addr2] [nvarchar] (50) NULL
  17. alter table [client] alter column [occupation1] [nvarchar] (50) NULL
  18. alter table [client] alter column [occupation2] [nvarchar] (50) NULL
  19. alter table [client] alter column [birthday1] [nvarchar] (50) NULL
  20. alter table [client] alter column [birthday2] [nvarchar] (50) NULL
  21. alter table [client] alter column [time3] [nvarchar] (50) NULL
  22. alter table [client] alter column [area] [nvarchar] (50) NULL
  23. alter table [client] alter column [area2] [nvarchar] (50) NULL
  24. alter table [client] alter column [check1] [nvarchar] (50) NULL
  25. alter table [client] alter column [check2] [nvarchar] (50) NULL
  26. alter table [client] alter column [check3] [nvarchar] (50) NULL
  27. alter table [client] alter column [sex] [nvarchar] (50) NULL
  28. alter table [client] alter column [zodiac] [nvarchar] (50) NULL
  29. CREATE UNIQUE NONCLUSTERED INDEX [id] ON [dbo].[client]
  30. (
  31. [id] ASC
  32. )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]
  33. go
  34. --version±í;
  35. if not exists(select name from syscolumns where id=object_id('version') and name='curdate')
  36. alter table [version] add [curdate] [nvarchar](50) NULL
  37. else
  38. alter table [version] alter column [curdate] [nvarchar](50) NULL
  39. if not exists(select name from syscolumns where id=object_id('version') and name='cardlength')
  40. alter table [version] add [cardlength] [nvarchar](50) NULL
  41. else
  42. alter table [version] alter column [cardlength] [nvarchar](50) NULL
  43. alter table [version] alter column [version] [nvarchar](50) NULL
  44. alter table [version] alter column [check1] [nvarchar](50) NULL
  45. alter table [version] alter column [check2] [nvarchar](50) NULL
  46. alter table [version] alter column [check3] [nvarchar](50) NULL
  47. alter table [version] alter column [check4] [nvarchar](50) NULL
  48. alter table [version] alter column [edit1] [nvarchar](50) NULL
  49. alter table [version] alter column [edit2] [nvarchar](50) NULL
  50. alter table [version] alter column [edit3] [nvarchar](50) NULL
  51. alter table [version] alter column [edit4] [nvarchar](50) NULL
  52. alter table [version] alter column [info1] [nvarchar](50) NULL
  53. alter table [version] alter column [info2] [nvarchar](50) NULL
  54. alter table [version] alter column [info3] [nvarchar](50) NULL
  55. alter table [version] alter column [info4] [nvarchar](50) NULL
  56. alter table [version] alter column [info5] [nvarchar](50) NULL
  57. alter table [version] alter column [bak1] [nvarchar](50) NULL
  58. alter table [version] alter column [bak2] [nvarchar](50) NULL
  59. alter table [version] alter column [bak3] [nvarchar](50) NULL
  60. alter table [version] alter column [bak4] [nvarchar](50) NULL
  61. alter table [version] alter column [bak5] [nvarchar](50) NULL
  62. alter table [version] alter column [bak6] [nvarchar](50) NULL
  63. alter table [version] alter column [baktime] [nvarchar](50) NULL
  64. alter table [version] alter column [bakserver1] [nvarchar](50) NULL
  65. alter table [version] alter column [bakserver2] [nvarchar](50) NULL
  66. alter table [version] alter column [bakserver3] [nvarchar](50) NULL
  67. alter table [version] alter column [bakserver4] [nvarchar](50) NULL
  68. alter table [version] alter column [bakserver5] [nvarchar](50) NULL
  69. alter table [version] alter column [msgaccount] [nvarchar](50) NULL
  70. alter table [version] alter column [msgpsw] [nvarchar](50) NULL
  71. alter table [version] alter column [msgused] [nvarchar](50) NULL
  72. alter table [version] alter column [msgbalance] [nvarchar](50) NULL
  73. alter table [version] alter column [msgcheck1] [nvarchar](50) NULL
  74. alter table [version] alter column [msgcheck2] [nvarchar](50) NULL
  75. alter table [version] alter column [msgdays1] [nvarchar](50) NULL
  76. alter table [version] alter column [msgdays2] [nvarchar](50) NULL
  77. alter table [version] alter column [msgcontent1] [nvarchar](max) NULL
  78. alter table [version] alter column [msgcontent2] [nvarchar](max) NULL
  79. alter table [version] alter column [remarks] [nvarchar](max) NULL
  80. alter table [version] alter column [rate] [nvarchar](50) NULL
  81. alter table [version] alter column [msgcheck3] [nvarchar](50) NULL
  82. alter table [version] alter column [msgcontent3] [nvarchar](max) NULL
  83. alter table [version] alter column [salarycheck1] [nvarchar](50) NULL
  84. alter table [version] alter column [salarycheck2] [nvarchar](50) NULL
  85. alter table [version] alter column [msgcheck4] [nvarchar](50) NULL
  86. alter table [version] alter column [msgtime] [nvarchar](50) NULL
  87. alter table [version] alter column [msgphones] [nvarchar](max) NULL
  88. alter table [version] alter column [info6] [nvarchar](50) NULL
  89. alter table [version] alter column [msgcompanyname] [nvarchar](50) NULL
  90. alter table [version] alter column [msgphones2] [nvarchar](max) NULL
  91. alter table [version] alter column [msgsendtype] [nvarchar](50) NULL
  92. alter table [version] alter column [msgcontent5] [nvarchar](max) NULL
  93. alter table [version] alter column [msgcontent6] [nvarchar](max) NULL
  94. alter table [version] alter column [rate2] [nvarchar](50) NULL--
  95. alter table [version] alter column [salarycheck3] [nvarchar](50) NULL
  96. alter table [version] alter column [salarycheck4] [nvarchar](50) NULL
  97. alter table [version] alter column [msgcheck5] [nvarchar](50) NULL
  98. alter table [version] alter column [msgcheck6] [nvarchar](50) NULL
  99. alter table [version] alter column [setcheck1] [nvarchar](50) NULL
  100. alter table [version] alter column [setcheck2] [nvarchar](50) NULL
  101. alter table [version] alter column [setcheck3] [nvarchar](50) NULL
  102. alter table [version] alter column [setcheck4] [nvarchar](50) NULL
  103. alter table [version] alter column [setcheck5] [nvarchar](50) NULL
  104. alter table [version] alter column [setcheck10] [nvarchar](50) NULL
  105. alter table [version] alter column [printer1] [nvarchar](50) NULL
  106. alter table [version] alter column [printer2] [nvarchar](50) NULL
  107. alter table [version] alter column [printer3] [nvarchar](50) NULL
  108. alter table [version] alter column [setprintstyle] [nvarchar](50) NULL
  109. alter table [version] alter column [setprintstyle2] [nvarchar](50) NULL
  110. alter table [version] alter column [uploadcheck1] [nvarchar](50) NULL
  111. alter table [version] alter column [uploadcheck2] [nvarchar](50) NULL
  112. alter table [version] alter column [uploadcheck3] [nvarchar](50) NULL
  113. alter table [version] alter column [uploadcheck4] [nvarchar](50) NULL
  114. alter table [version] alter column [bak11] [nvarchar](50) NULL
  115. alter table [version] alter column [bak22] [nvarchar](50) NULL
  116. alter table [version] alter column [bak33] [nvarchar](50) NULL
  117. alter table [version] alter column [bak44] [nvarchar](50) NULL
  118. alter table [version] alter column [ziptype1] [nvarchar](50) NULL
  119. alter table [version] alter column [ziptype2] [nvarchar](50) NULL
  120. alter table [version] alter column [ziptype3] [nvarchar](50) NULL
  121. alter table [version] alter column [ziptype4] [nvarchar](50) NULL
  122. alter table [version] alter column [limitcount1] [nvarchar](50) NULL
  123. alter table [version] alter column [limitcount2] [nvarchar](50) NULL
  124. alter table [version] alter column [limitcount3] [nvarchar](50) NULL
  125. alter table [version] alter column [salaryset] [nvarchar](max) NULL
  126. alter table [version] alter column [setcheck11] [nvarchar](50) NULL
  127. alter table [version] alter column [setcheck12] [nvarchar](50) NULL
  128. alter table [version] alter column [setprintstyle3] [nvarchar](50) NULL
  129. alter table [version] alter column [msgcheck7] [nvarchar](50) NULL
  130. alter table [version] alter column [msgcheck8] [nvarchar](50) NULL
  131. alter table [version] alter column [msgcheck9] [nvarchar](50) NULL
  132. alter table [version] alter column [msgcheck10] [nvarchar](50) NULL
  133. alter table [version] alter column [msgcontent8] [nvarchar](max) NULL
  134. alter table [version] alter column [msgcontent9] [nvarchar](max) NULL
  135. alter table [version] alter column [msgcontent10] [nvarchar](max) NULL
  136. alter table [version] alter column [setcheck13] [nvarchar](50) NULL
  137. alter table [version] alter column [time1] [nvarchar](50) NULL
  138. alter table [version] alter column [time2] [nvarchar](50) NULL
  139. alter table [version] alter column [time3] [nvarchar](50) NULL
  140. alter table [version] alter column [setcheck14] [nvarchar](50) NULL
  141. alter table [version] alter column [setcheck15] [nvarchar](50) NULL
  142. alter table [version] alter column [msgcheck11] [nvarchar](50) NULL
  143. alter table [version] alter column [msgcheck12] [nvarchar](50) NULL
  144. alter table [version] alter column [msgcheck13] [nvarchar](50) NULL
  145. alter table [version] alter column [msgcheck14] [nvarchar](50) NULL
  146. alter table [version] alter column [msgcontent11] [nvarchar](max) NULL
  147. alter table [version] alter column [msgcontent12] [nvarchar](max) NULL
  148. alter table [version] alter column [msgcontent13] [nvarchar](max) NULL
  149. alter table [version] alter column [msgcontent14] [nvarchar](max) NULL
  150. alter table [version] alter column [setcheck6] [nvarchar](50) NULL
  151. alter table [version] alter column [msgcheck15] [nvarchar](50) NULL
  152. alter table [version] alter column [msgcontent15] [nvarchar](max) NULL
  153. alter table [version] alter column [logdays] [nvarchar](50) NULL
  154. alter table [version] alter column [setcheck17] [nvarchar](50) NULL
  155. alter table [version] alter column [setcheck18] [nvarchar](50) NULL
  156. alter table [version] alter column [setcheck19] [nvarchar](50) NULL
  157. alter table [version] alter column [uploadrule] [nvarchar](max) NULL
  158. alter table [version] alter column [setcheck20] [nvarchar](50) NULL
  159. alter table [version] alter column [cardnum] [nvarchar](50) NULL
  160. alter table [version] alter column [cardscale] [nvarchar](500) NULL
  161. alter table [version] alter column [info7] [nvarchar](120) NULL
  162. alter table [version] alter column [setcheck21] [nvarchar](50) NULL
  163. alter table [version] alter column [msgcheck16] [nvarchar](50) NULL
  164. alter table [version] alter column [hospitalmsgcheck1] [nvarchar](50) NULL
  165. alter table [version] alter column [hospitalmsgcheck2] [nvarchar](50) NULL
  166. alter table [version] alter column [serialno] [nvarchar](50) NULL
  167. alter table [version] alter column [serialno2] [nvarchar](50) NULL
  168. alter table [version] alter column [msgcheck17] [nvarchar](50) NULL
  169. alter table [version] alter column [msgcontent17] [nvarchar](max) NULL
  170. alter table [version] alter column [setcheck22] [nvarchar](50) NULL
  171. alter table [version] alter column [setcheck23] [nvarchar](50) NULL
  172. alter table [version] alter column [info8] [nvarchar](120) NULL
  173. alter table [version] alter column [setcheck24] [nvarchar](120) NULL
  174. alter table [version] alter column [outtime] [nvarchar](120) NULL
  175. alter table [version] alter column [info9] [nvarchar](120) NULL
  176. alter table [version] alter column [reverse1] [nvarchar](50) NULL
  177. alter table [version] alter column [reverse2] [nvarchar](50) NULL
  178. alter table [version] alter column [reverse3] [nvarchar](50) NULL
  179. alter table [version] alter column [reverse4] [nvarchar](50) NULL
  180. alter table [version] alter column [reverse5] [nvarchar](50) NULL
  181. alter table [version] alter column [photo] [image] NULL
  182. alter table [version] alter column [delcheck1] [nvarchar](50) NULL
  183. alter table [version] alter column [delcheck2] [nvarchar](50) NULL
  184. alter table [version] alter column [delcheck3] [nvarchar](50) NULL
  185. alter table [version] alter column [delcheck4] [nvarchar](50) NULL
  186. alter table [version] alter column [deledit1] [nvarchar](50) NULL
  187. alter table [version] alter column [deledit2] [nvarchar](50) NULL
  188. alter table [version] alter column [deledit3] [nvarchar](50) NULL
  189. alter table [version] alter column [deledit4] [nvarchar](50) NULL
  190. alter table [version] alter column [alarmdays1] [nvarchar](50) NULL
  191. alter table [version] alter column [alarmdays2] [nvarchar](50) NULL
  192. alter table [version] alter column [alarmdays3] [nvarchar](50) NULL
  193. alter table [version] alter column [alarmdays4] [nvarchar](50) NULL
  194. alter table [version] alter column [alarmdays5] [nvarchar](50) NULL
  195. alter table [version] alter column [alarmdays6] [nvarchar](50) NULL
  196. go