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
566be6ad
Commit
566be6ad
authored
Feb 18, 2016
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tracking New Table Schema
parent
c9149845
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
structure.sql
structure.sql
+22
-0
No files found.
structure.sql
View file @
566be6ad
...
...
@@ -136,3 +136,25 @@ CREATE TABLE IF NOT EXISTS `telegram_update` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_general_ci
;
CREATE
TABLE
IF
NOT
EXISTS
`track`
(
`id`
bigint
(
20
)
unsigned
NOT
NULL
AUTO_INCREMENT
COMMENT
'Row unique id'
,
`user_id`
bigint
NULL
DEFAULT
NULL
COMMENT
'User id'
,
`chat_id`
bigint
NULL
DEFAULT
NULL
COMMENT
'Telegram chat_id can be a the user id or the chat id '
,
`is_active`
tinyint
(
1
)
NOT
NULL
DEFAULT
'1'
COMMENT
'1 track is active 0 track has been deactivated'
,
`track_command`
varchar
(
160
)
DEFAULT
''
COMMENT
'Default Command to execute'
,
`track_name`
varchar
(
160
)
NOT
NULL
DEFAULT
''
COMMENT
'Name of the track can be the command name or a generic name for tracking between multiple commands'
,
`data`
varchar
(
1000
)
DEFAULT
'NULL'
COMMENT
'Data stored from command'
,
`created_at`
timestamp
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
,
`updated_at`
timestamp
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
,
PRIMARY
KEY
(
`id`
),
KEY
`user_id`
(
`user_id`
),
KEY
`chat_id`
(
`chat_id`
),
KEY
`is_active`
(
`is_active`
),
KEY
`track_name`
(
`track_name`
),
FOREIGN
KEY
(
`user_id`
)
REFERENCES
`user`
(
`id`
),
FOREIGN
KEY
(
`chat_id`
)
REFERENCES
`chat`
(
`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