Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
4854b66d
Commit
4854b66d
authored
May 23, 2016
by
Jack'lul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix creation order
parent
9889ef19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
structure.sql
structure.sql
+19
-19
No files found.
structure.sql
View file @
4854b66d
...
@@ -131,6 +131,25 @@ CREATE TABLE IF NOT EXISTS `message` (
...
@@ -131,6 +131,25 @@ CREATE TABLE IF NOT EXISTS `message` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`edited_message`
(
`id`
bigint
UNSIGNED
AUTO_INCREMENT
COMMENT
'Unique identifier for this entry.'
,
`chat_id`
bigint
COMMENT
'Chat identifier.'
,
`message_id`
bigint
UNSIGNED
COMMENT
'Unique message identifier'
,
`user_id`
bigint
NULL
COMMENT
'User identifier'
,
`edit_date`
timestamp
NULL
DEFAULT
NULL
COMMENT
'Date the message was sent in timestamp format'
,
`text`
TEXT
DEFAULT
NULL
COMMENT
'For text messages, the actual UTF-8 text of the message max message length 4096 char utf8'
,
`entities`
TEXT
DEFAULT
NULL
COMMENT
'For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text'
,
`caption`
TEXT
DEFAULT
NULL
COMMENT
'For message with caption, the actual UTF-8 text of the caption'
,
PRIMARY
KEY
(
`id`
),
KEY
`chat_id`
(
`chat_id`
),
KEY
`message_id`
(
`message_id`
),
KEY
`user_id`
(
`user_id`
),
FOREIGN
KEY
(
`chat_id`
)
REFERENCES
`chat`
(
`id`
),
FOREIGN
KEY
(
`chat_id`
,
`message_id`
)
REFERENCES
`message`
(
`chat_id`
,
`id`
),
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`telegram_update`
(
CREATE
TABLE
IF
NOT
EXISTS
`telegram_update`
(
`id`
bigint
UNSIGNED
COMMENT
'The update
\'
s unique identifier.'
,
`id`
bigint
UNSIGNED
COMMENT
'The update
\'
s unique identifier.'
,
`chat_id`
bigint
NULL
DEFAULT
NULL
COMMENT
'Chat identifier.'
,
`chat_id`
bigint
NULL
DEFAULT
NULL
COMMENT
'Chat identifier.'
,
...
@@ -185,22 +204,3 @@ CREATE TABLE IF NOT EXISTS `botan_shortener` (
...
@@ -185,22 +204,3 @@ CREATE TABLE IF NOT EXISTS `botan_shortener` (
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`edited_message`
(
`id`
bigint
UNSIGNED
AUTO_INCREMENT
COMMENT
'Unique identifier for this entry.'
,
`chat_id`
bigint
COMMENT
'Chat identifier.'
,
`message_id`
bigint
UNSIGNED
COMMENT
'Unique message identifier'
,
`user_id`
bigint
NULL
COMMENT
'User identifier'
,
`edit_date`
timestamp
NULL
DEFAULT
NULL
COMMENT
'Date the message was sent in timestamp format'
,
`text`
TEXT
DEFAULT
NULL
COMMENT
'For text messages, the actual UTF-8 text of the message max message length 4096 char utf8'
,
`entities`
TEXT
DEFAULT
NULL
COMMENT
'For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text'
,
`caption`
TEXT
DEFAULT
NULL
COMMENT
'For message with caption, the actual UTF-8 text of the caption'
,
PRIMARY
KEY
(
`id`
),
KEY
`chat_id`
(
`chat_id`
),
KEY
`message_id`
(
`message_id`
),
KEY
`user_id`
(
`user_id`
),
FOREIGN
KEY
(
`chat_id`
)
REFERENCES
`chat`
(
`id`
),
FOREIGN
KEY
(
`chat_id`
,
`message_id`
)
REFERENCES
`message`
(
`chat_id`
,
`id`
),
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment