-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.sql
128 lines (127 loc) · 9.38 KB
/
script.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
USE [master]
GO
/****** Object: Database [PlantDB] Script Date: 2021-12-01 5:57:12 PM ******/
CREATE DATABASE [PlantDB]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'PlantDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\PlantDB.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
LOG ON
( NAME = N'PlantDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\DATA\PlantDB_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
WITH CATALOG_COLLATION = DATABASE_DEFAULT
GO
ALTER DATABASE [PlantDB] SET COMPATIBILITY_LEVEL = 150
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [PlantDB].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [PlantDB] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [PlantDB] SET ANSI_NULLS OFF
GO
ALTER DATABASE [PlantDB] SET ANSI_PADDING OFF
GO
ALTER DATABASE [PlantDB] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [PlantDB] SET ARITHABORT OFF
GO
ALTER DATABASE [PlantDB] SET AUTO_CLOSE ON
GO
ALTER DATABASE [PlantDB] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [PlantDB] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [PlantDB] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [PlantDB] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [PlantDB] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [PlantDB] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [PlantDB] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [PlantDB] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [PlantDB] SET ENABLE_BROKER
GO
ALTER DATABASE [PlantDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [PlantDB] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [PlantDB] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [PlantDB] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [PlantDB] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [PlantDB] SET READ_COMMITTED_SNAPSHOT ON
GO
ALTER DATABASE [PlantDB] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [PlantDB] SET RECOVERY SIMPLE
GO
ALTER DATABASE [PlantDB] SET MULTI_USER
GO
ALTER DATABASE [PlantDB] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [PlantDB] SET DB_CHAINING OFF
GO
ALTER DATABASE [PlantDB] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [PlantDB] SET TARGET_RECOVERY_TIME = 60 SECONDS
GO
ALTER DATABASE [PlantDB] SET DELAYED_DURABILITY = DISABLED
GO
ALTER DATABASE [PlantDB] SET ACCELERATED_DATABASE_RECOVERY = OFF
GO
ALTER DATABASE [PlantDB] SET QUERY_STORE = OFF
GO
USE [PlantDB]
GO
/****** Object: Table [dbo].[__EFMigrationsHistory] Script Date: 2021-12-01 5:57:13 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[__EFMigrationsHistory](
[MigrationId] [nvarchar](150) NOT NULL,
[ProductVersion] [nvarchar](32) NOT NULL,
CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY CLUSTERED
(
[MigrationId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[DCandidates] Script Date: 2021-12-01 5:57:13 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DCandidates](
[id] [int] IDENTITY(1,1) NOT NULL,
[waterStatus] [nvarchar](20) NULL,
[lastTimeWater] [nvarchar](50) NULL,
[watering] [bit] NOT NULL,
CONSTRAINT [PK_DCandidates] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[__EFMigrationsHistory] ([MigrationId], [ProductVersion]) VALUES (N'20211201172722_I', N'5.0.12')
GO
SET IDENTITY_INSERT [dbo].[DCandidates] ON
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (1, N'low', N'2021-10-01T20:59:35.397Z', 0)
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (2, N'high', N'2021-12-01T22:43:48.284Z', 0)
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (3, N'low', N'2021-10-01T20:59:35.397Z', 0)
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (4, N'high', N'2021-12-01T22:23:02.635Z', 0)
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (5, N'low', N'2021-10-01T20:59:35.397Z', 0)
INSERT [dbo].[DCandidates] ([id], [waterStatus], [lastTimeWater], [watering]) VALUES (6, N'high', N'2021-12-01T22:44:23.032Z', 0)
SET IDENTITY_INSERT [dbo].[DCandidates] OFF
GO
USE [master]
GO
ALTER DATABASE [PlantDB] SET READ_WRITE
GO