Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pavel Valach
Warden
Commits
bf3fcd75
Commit
bf3fcd75
authored
8 years ago
by
Pavel Kácha
Browse files
Options
Downloads
Patches
Plain Diff
Schema: Unsigned ints, event.id -> bigint, clients.test -> tinyint, events: received index
parent
3f55f98d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
warden3/warden_server/warden_3.0.sql
+23
-21
23 additions, 21 deletions
warden3/warden_server/warden_3.0.sql
with
23 additions
and
21 deletions
warden3/warden_server/warden_3.0.sql
+
23
−
21
View file @
bf3fcd75
...
...
@@ -27,7 +27,7 @@ SET time_zone = "+00:00";
--
CREATE
TABLE
IF
NOT
EXISTS
`categories`
(
`id`
int
(
11
)
NOT
NULL
,
`id`
int
UNSIGNED
NOT
NULL
,
`category`
varchar
(
64
)
NOT
NULL
,
`subcategory`
varchar
(
64
)
DEFAULT
NULL
,
`cat_subcat`
varchar
(
129
)
NOT
NULL
,
...
...
@@ -41,20 +41,21 @@ CREATE TABLE IF NOT EXISTS `categories` (
--
CREATE
TABLE
IF
NOT
EXISTS
`clients`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`id`
int
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`registered`
timestamp
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
,
`requestor`
varchar
(
256
)
NOT
NULL
,
`hostname`
varchar
(
256
)
NOT
NULL
,
`note`
text
NULL
,
`valid`
tinyint
(
1
)
NOT
NULL
DEFAULT
'1'
,
`valid`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'1'
,
`name`
varchar
(
64
)
NOT
NULL
,
`secret`
varchar
(
16
)
NULL
,
`read`
tinyint
(
1
)
NOT
NULL
DEFAULT
'1'
,
`debug`
tinyint
(
1
)
NOT
NULL
DEFAULT
'0'
,
`write`
tinyint
(
1
)
NOT
NULL
DEFAULT
'0'
,
`test`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`read`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'1'
,
`debug`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'0'
,
`write`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'0'
,
`test`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
`id`
),
KEY
`clients_1`
(
`valid`
,
`secret`
,
`hostname`
)
KEY
`clients_1`
(
`valid`
,
`secret`
,
`hostname`
),
KEY
`clients_2`
(
`valid`
,
`name`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
DEFAULT
COLLATE
utf8_unicode_ci
AUTO_INCREMENT
=
1
;
-- --------------------------------------------------------
...
...
@@ -64,14 +65,15 @@ CREATE TABLE IF NOT EXISTS `clients` (
--
CREATE
TABLE
IF
NOT
EXISTS
`events`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`id`
bigint
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`received`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`client_id`
int
(
11
)
NOT
NULL
,
`client_id`
int
UNSIGNED
NOT
NULL
,
`data`
longtext
NOT
NULL
,
`valid`
tinyint
(
1
)
NOT
NULL
DEFAULT
'1'
,
`valid`
tinyint
UNSIGNED
NOT
NULL
DEFAULT
'1'
,
PRIMARY
KEY
(
`id`
),
KEY
`id`
(
`id`
,
`client_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
DEFAULT
COLLATE
utf8_unicode_ci
AUTO_INCREMENT
=
1
;
KEY
`id`
(
`id`
,
`client_id`
),
KEY
`received`
(
`received`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
DEFAULT
COLLATE
utf8_unicode_ci
AUTO_INCREMENT
=
1
;
-- --------------------------------------------------------
...
...
@@ -80,8 +82,8 @@ CREATE TABLE IF NOT EXISTS `events` (
--
CREATE
TABLE
IF
NOT
EXISTS
`event_category_mapping`
(
`event_id`
int
(
11
)
NOT
NULL
,
`category_id`
int
(
11
)
NOT
NULL
,
`event_id`
bigint
UNSIGNED
NOT
NULL
,
`category_id`
int
UNSIGNED
NOT
NULL
,
KEY
`event_id_2`
(
`event_id`
,
`category_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
DEFAULT
COLLATE
utf8_unicode_ci
;
...
...
@@ -92,8 +94,8 @@ CREATE TABLE IF NOT EXISTS `event_category_mapping` (
--
CREATE
TABLE
IF
NOT
EXISTS
`event_tag_mapping`
(
`event_id`
int
(
11
)
NOT
NULL
,
`tag_id`
int
(
11
)
NOT
NULL
,
`event_id`
bigint
UNSIGNED
NOT
NULL
,
`tag_id`
int
UNSIGNED
NOT
NULL
,
KEY
`event_id_2`
(
`event_id`
,
`tag_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
DEFAULT
COLLATE
utf8_unicode_ci
;
...
...
@@ -104,9 +106,9 @@ CREATE TABLE IF NOT EXISTS `event_tag_mapping` (
--
CREATE
TABLE
IF
NOT
EXISTS
`last_events`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`client_id`
int
(
11
)
NOT
NULL
,
`event_id`
int
(
11
)
NOT
NULL
,
`id`
int
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`client_id`
int
UNSIGNED
NOT
NULL
,
`event_id`
bigint
UNSIGNED
NOT
NULL
,
`timestamp`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
),
KEY
`client_id`
(
`client_id`
,
`event_id`
)
...
...
@@ -119,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `last_events` (
--
CREATE
TABLE
IF
NOT
EXISTS
`tags`
(
`id`
int
(
11
)
NOT
NULL
,
`id`
int
UNSIGNED
NOT
NULL
,
`tag`
varchar
(
64
)
NOT
NULL
,
KEY
`id_tag_name`
(
`id`
,
`tag`
),
KEY
`tag_name`
(
`tag`
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment