You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
12 KiB

2 years ago
  1. USE [master]
  2. GO
  3. /****** Object: Database [SqlSugar4XTest] Script Date: 2017/5/29 20:01:11 ******/
  4. CREATE DATABASE [SqlSugar4XTest]
  5. GO
  6. IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
  7. begin
  8. EXEC [SqlSugar4XTest].[dbo].[sp_fulltext_database] @action = 'enable'
  9. end
  10. GO
  11. ALTER DATABASE [SqlSugar4XTest] SET ANSI_NULL_DEFAULT OFF
  12. GO
  13. ALTER DATABASE [SqlSugar4XTest] SET ANSI_NULLS OFF
  14. GO
  15. ALTER DATABASE [SqlSugar4XTest] SET ANSI_PADDING OFF
  16. GO
  17. ALTER DATABASE [SqlSugar4XTest] SET ANSI_WARNINGS OFF
  18. GO
  19. ALTER DATABASE [SqlSugar4XTest] SET ARITHABORT OFF
  20. GO
  21. ALTER DATABASE [SqlSugar4XTest] SET AUTO_CLOSE OFF
  22. GO
  23. ALTER DATABASE [SqlSugar4XTest] SET AUTO_SHRINK OFF
  24. GO
  25. ALTER DATABASE [SqlSugar4XTest] SET AUTO_UPDATE_STATISTICS ON
  26. GO
  27. ALTER DATABASE [SqlSugar4XTest] SET CURSOR_CLOSE_ON_COMMIT OFF
  28. GO
  29. ALTER DATABASE [SqlSugar4XTest] SET CURSOR_DEFAULT GLOBAL
  30. GO
  31. ALTER DATABASE [SqlSugar4XTest] SET CONCAT_NULL_YIELDS_NULL OFF
  32. GO
  33. ALTER DATABASE [SqlSugar4XTest] SET NUMERIC_ROUNDABORT OFF
  34. GO
  35. ALTER DATABASE [SqlSugar4XTest] SET QUOTED_IDENTIFIER OFF
  36. GO
  37. ALTER DATABASE [SqlSugar4XTest] SET RECURSIVE_TRIGGERS OFF
  38. GO
  39. ALTER DATABASE [SqlSugar4XTest] SET DISABLE_BROKER
  40. GO
  41. ALTER DATABASE [SqlSugar4XTest] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
  42. GO
  43. ALTER DATABASE [SqlSugar4XTest] SET DATE_CORRELATION_OPTIMIZATION OFF
  44. GO
  45. ALTER DATABASE [SqlSugar4XTest] SET TRUSTWORTHY OFF
  46. GO
  47. ALTER DATABASE [SqlSugar4XTest] SET ALLOW_SNAPSHOT_ISOLATION OFF
  48. GO
  49. ALTER DATABASE [SqlSugar4XTest] SET PARAMETERIZATION SIMPLE
  50. GO
  51. ALTER DATABASE [SqlSugar4XTest] SET READ_COMMITTED_SNAPSHOT OFF
  52. GO
  53. ALTER DATABASE [SqlSugar4XTest] SET HONOR_BROKER_PRIORITY OFF
  54. GO
  55. ALTER DATABASE [SqlSugar4XTest] SET RECOVERY FULL
  56. GO
  57. ALTER DATABASE [SqlSugar4XTest] SET MULTI_USER
  58. GO
  59. ALTER DATABASE [SqlSugar4XTest] SET PAGE_VERIFY CHECKSUM
  60. GO
  61. ALTER DATABASE [SqlSugar4XTest] SET DB_CHAINING OFF
  62. GO
  63. EXEC sys.sp_db_vardecimal_storage_format N'SqlSugar4XTest', N'ON'
  64. GO
  65. USE [SqlSugar4XTest]
  66. GO
  67. /****** Object: Table [dbo].[School] Script Date: 2017/5/29 20:01:12 ******/
  68. SET ANSI_NULLS ON
  69. GO
  70. SET QUOTED_IDENTIFIER ON
  71. GO
  72. SET ANSI_PADDING ON
  73. GO
  74. CREATE TABLE [dbo].[School](
  75. [Id] [int] IDENTITY(1,1) NOT NULL,
  76. [Name] [varchar](50) NULL,
  77. PRIMARY KEY CLUSTERED
  78. (
  79. [Id] ASC
  80. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  81. ) ON [PRIMARY]
  82. GO
  83. SET ANSI_PADDING OFF
  84. GO
  85. /****** Object: Table [dbo].[Student] Script Date: 2017/5/29 20:01:12 ******/
  86. SET ANSI_NULLS ON
  87. GO
  88. SET QUOTED_IDENTIFIER ON
  89. GO
  90. SET ANSI_PADDING ON
  91. GO
  92. CREATE TABLE [dbo].[Student](
  93. [Id] [int] IDENTITY(1,1) NOT NULL,
  94. [SchoolId] [int] NULL,
  95. [Name] [varchar](50) NULL CONSTRAINT [DF_Student_Name] DEFAULT ('default name'),
  96. [CreateTime] [datetime] NULL CONSTRAINT [DF_Student_CreateTime] DEFAULT (getdate()),
  97. CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED
  98. (
  99. [Id] ASC
  100. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  101. ) ON [PRIMARY]
  102. GO
  103. SET ANSI_PADDING OFF
  104. GO
  105. SET IDENTITY_INSERT [dbo].[Student] ON
  106. INSERT [dbo].[Student] ([Id], [SchoolId], [Name], [CreateTime]) VALUES (92992, 0, N'jack', CAST(N'2010-01-01 00:00:00.000' AS DateTime))
  107. INSERT [dbo].[Student] ([Id], [SchoolId], [Name], [CreateTime]) VALUES (92993, 0, NULL, CAST(N'2010-01-01 00:00:00.000' AS DateTime))
  108. SET IDENTITY_INSERT [dbo].[Student] OFF
  109. /****** Object: StoredProcedure [dbo].[sp_school] Script Date: 2017/5/29 20:01:12 ******/
  110. SET ANSI_NULLS ON
  111. GO
  112. SET QUOTED_IDENTIFIER ON
  113. GO
  114. create proc [dbo].[sp_school]
  115. @p1 int,
  116. @p2 int output
  117. as
  118. set @p2=100
  119. select * from School
  120. GO
  121. EXEC [SqlSugar4XTest].sys.sp_addextendedproperty @name=N'Student', @value=N'Student Info'
  122. GO
  123. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Pk' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Student', @level2type=N'COLUMN',@level2name=N'Id'
  124. GO
  125. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Student Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Student', @level2type=N'COLUMN',@level2name=N'Name'
  126. GO
  127. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'student info' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Student'
  128. GO
  129. USE [master]
  130. GO
  131. ALTER DATABASE [SqlSugar4XTest] SET READ_WRITE
  132. GO
  133. USE [SqlSugar4XTest]
  134. GO
  135. /****** Object: Table [dbo].[DataTestInfo] Script Date: 2017/6/1 12:46:50 ******/
  136. SET ANSI_NULLS ON
  137. GO
  138. SET QUOTED_IDENTIFIER ON
  139. GO
  140. SET ANSI_PADDING ON
  141. GO
  142. CREATE TABLE [dbo].[DataTestInfo](
  143. [Int1] [int] IDENTITY(1,1) NOT NULL,
  144. [Int2] [int] NULL,
  145. [String] [varchar](50) NULL,
  146. [Decimal1] [decimal](18, 0) NOT NULL,
  147. [Decimal2] [decimal](18, 0) NULL,
  148. [Datetime1] [datetime] NOT NULL,
  149. [Datetime2] [datetime] NULL,
  150. [Image1] [image] NOT NULL,
  151. [Image2] [image] NULL,
  152. [Guid1] [uniqueidentifier] NOT NULL,
  153. [Guid2] [uniqueidentifier] NULL,
  154. [Money1] [money] NOT NULL,
  155. [Money2] [money] NULL,
  156. [Varbinary1] [varbinary](max) NOT NULL,
  157. [Varbinary2] [varbinary](max) NULL,
  158. [Float1] [float] NOT NULL,
  159. [Float2] [float] NULL,
  160. CONSTRAINT [PK_DataTypeTestInfo] PRIMARY KEY CLUSTERED
  161. (
  162. [Int1] ASC
  163. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  164. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  165. GO
  166. SET ANSI_PADDING OFF
  167. GO
  168. CREATE TABLE [dbo].[DataTestInfo2](
  169. [PK] [uniqueidentifier] NOT NULL,
  170. [Bool1] [bit] NOT NULL,
  171. [Bool2] [bit] NULL,
  172. [Text1] [text] NULL,
  173. PRIMARY KEY CLUSTERED
  174. (
  175. [PK] 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] TEXTIMAGE_ON [PRIMARY]
  178. GO