-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathcreate_tables.sql
81 lines (81 loc) · 1.58 KB
/
create_tables.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
USE
[telegram_bot]
GO
/****** Object: Table [dbo].[tgb_devices_sessions] Script Date: 30.06.2022 16:22:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tgb_devices_sessions]
(
[
deviceId] [
bigint]
NOT
NULL, [
deviceTitle] [
nvarchar]
(
512
) NOT NULL,
[FormUri] [nvarchar]
(
512
) NOT NULL,
[QualifiedName] [nvarchar]
(
512
) NOT NULL,
CONSTRAINT [PK_tgb_devices_sessions_1] PRIMARY KEY CLUSTERED
(
[
deviceId] 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].[tgb_devices_sessions_data] Script Date: 30.06.2022 16:22:09 ******/
SET ANSI_NULLS
ON
GO
SET QUOTED_IDENTIFIER
ON
GO
CREATE TABLE [dbo].[tgb_devices_sessions_data]
(
[
Id] [
uniqueidentifier]
NOT
NULL, [
deviceId] [
bigint]
NOT
NULL, [
key] [
nvarchar]
(
512
) NOT NULL,
[value] [nvarchar]
(
max
) NOT NULL,
[type] [nvarchar]
(
512
) NOT NULL,
CONSTRAINT [PK_tgb_devices_session_data] 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] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[tgb_devices_sessions_data] ADD CONSTRAINT [DF_tgb_devices_session_data_Id] DEFAULT (newid()) FOR [Id]
GO