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
48a5d171
Commit
48a5d171
authored
Apr 23, 2016
by
MBoretto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'brownbear' of
https://github.com/MBoretto/php-telegram-bot
into brownbear
parents
810cb1a3
ccfb5107
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
structure.sql
structure.sql
+9
-9
No files found.
structure.sql
View file @
48a5d171
...
...
@@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `user` (
`updated_at`
timestamp
NULL
DEFAULT
NULL
COMMENT
'Entry date update'
,
PRIMARY
KEY
(
`id`
),
KEY
`username`
(
`username`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`chat`
(
`id`
bigint
COMMENT
'Unique user or chat identifier'
,
...
...
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `chat` (
`old_id`
bigint
DEFAULT
NULL
COMMENT
'Unique chat identifieri this is filled when a chat is converted to a superchat'
,
PRIMARY
KEY
(
`id`
),
KEY
`old_id`
(
`old_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`user_chat`
(
`user_id`
bigint
COMMENT
'Unique user identifier'
,
...
...
@@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `user_chat` (
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
,
FOREIGN
KEY
(
`chat_id`
)
REFERENCES
`chat`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`inline_query`
(
`id`
bigint
UNSIGNED
COMMENT
'Unique identifier for this query.'
,
...
...
@@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `inline_query` (
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`chosen_inline_query`
(
`id`
bigint
UNSIGNED
AUTO_INCREMENT
COMMENT
'Unique identifier for chosen query.'
,
...
...
@@ -59,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `chosen_inline_query` (
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`callback_query`
(
`id`
bigint
UNSIGNED
COMMENT
'Unique identifier for this query.'
,
...
...
@@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `callback_query` (
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`message`
(
`chat_id`
bigint
COMMENT
'Chat identifier.'
,
...
...
@@ -126,7 +126,7 @@ CREATE TABLE IF NOT EXISTS `message` (
FOREIGN
KEY
(
`new_chat_member`
)
REFERENCES
`user`
(
`id`
),
FOREIGN
KEY
(
`left_chat_member`
)
REFERENCES
`user`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`telegram_update`
(
`id`
bigint
UNSIGNED
COMMENT
'The update
\'
s unique identifier.'
,
...
...
@@ -146,7 +146,7 @@ CREATE TABLE IF NOT EXISTS `telegram_update` (
FOREIGN
KEY
(
`inline_query_id`
)
REFERENCES
`inline_query`
(
`id`
),
FOREIGN
KEY
(
`chosen_inline_query_id`
)
REFERENCES
`chosen_inline_query`
(
`id`
),
FOREIGN
KEY
(
`callback_query_id`
)
REFERENCES
`callback_query`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`conversation`
(
`id`
bigint
(
20
)
unsigned
AUTO_INCREMENT
COMMENT
'Row unique id'
,
...
...
@@ -167,4 +167,4 @@ CREATE TABLE IF NOT EXISTS `conversation` (
REFERENCES
`user`
(
`id`
),
FOREIGN
KEY
(
`chat_id`
)
REFERENCES
`chat`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_ci
;
¬
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_520_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