Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
shail
smradius
Commits
9f9da668
Commit
9f9da668
authored
15 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
* Updated database schema to be a bit more tolerant to missing data
* Added INT_UNSIGNED token to convert-tsql
parent
17c3288d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
database/convert-tsql
+8
-4
8 additions, 4 deletions
database/convert-tsql
database/core.tsql
+24
-24
24 additions, 24 deletions
database/core.tsql
with
32 additions
and
28 deletions
database/convert-tsql
+
8
−
4
View file @
9f9da668
...
...
@@ -59,7 +59,8 @@ case "$database" in
-e
's/@POSTLOAD@/SET FOREIGN_KEY_CHECKS=1;/'
\
-e
's/@CREATE_TABLE_SUFFIX@/TYPE=InnoDB CHARACTER SET latin1 COLLATE latin1_bin/'
\
-e
's/@SERIAL_TYPE@/SERIAL/'
\
-e
's/@BIG_INTEGER@/BIGINT UNSIGNED/'
\
-e
's/@BIGINT_UNSIGNED@/BIGINT UNSIGNED/'
\
-e
's/@INT_UNSIGNED@/INT UNSIGNED/'
\
-e
's/@TRACK_KEY_LEN@/255/'
\
-e
's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/'
<
"
$file
"
;;
...
...
@@ -71,7 +72,8 @@ case "$database" in
-e
's/@POSTLOAD@/SET FOREIGN_KEY_CHECKS=1;/'
\
-e
's/@CREATE_TABLE_SUFFIX@/TYPE=InnoDB CHARACTER SET latin1 COLLATE latin1_bin/'
\
-e
's/@SERIAL_TYPE@/SERIAL/'
\
-e
's/@BIG_INTEGER@/BIGINT UNSIGNED/'
\
-e
's/@BIGINT_UNSIGNED@/BIGINT UNSIGNED/'
\
-e
's/@INT_UNSIGNED@/INT UNSIGNED/'
\
-e
's/@TRACK_KEY_LEN@/512/'
\
-e
's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/'
<
"
$file
"
;;
...
...
@@ -83,7 +85,8 @@ case "$database" in
-e
's/@POSTLOAD@//'
\
-e
's/@CREATE_TABLE_SUFFIX@//'
\
-e
's/@SERIAL_TYPE@/SERIAL PRIMARY KEY/'
\
-e
's/@BIG_INTEGER@/INT8/'
\
-e
's/@BIGINT_UNSIGNED@/INT8/'
\
-e
's/@INT_UNSIGNED@/INT8/'
\
-e
's/@TRACK_KEY_LEN@/512/'
\
-e
's/@SERIAL_REF_TYPE@/INT8/'
<
"
$file
"
;;
...
...
@@ -95,7 +98,8 @@ case "$database" in
-e
's/@POSTLOAD@//'
\
-e
's/@CREATE_TABLE_SUFFIX@//'
\
-e
's/@SERIAL_TYPE@/INTEGER PRIMARY KEY AUTOINCREMENT/'
\
-e
's/@BIG_INTEGER@/INT8/'
\
-e
's/@BIGINT_UNSIGNED@/INT8/'
\
-e
's/@INT_UNSIGNED@/INT8/'
\
-e
's/@TRACK_KEY_LEN@/512/'
\
-e
's/@SERIAL_REF_TYPE@/INT8/'
<
"
$file
"
;;
...
...
This diff is collapsed.
Click to expand it.
database/core.tsql
+
24
−
24
View file @
9f9da668
...
...
@@ -119,52 +119,52 @@ CREATE TABLE @PREFIX@realm_attributes (
CREATE TABLE @PREFIX@accounting (
ID @SERIAL_TYPE@,
Username VARCHAR(255)
NOT NULL
,
Username VARCHAR(255),
ServiceType INT
UNSIGNED
NOT NULL
,
ServiceType
@
INT
_
UNSIGNED
@
,
FramedProtocol INT
UNSIGNED
NOT NULL
,
FramedProtocol
@
INT
_
UNSIGNED
@
,
NASPort VARCHAR(255)
NOT NULL
,
NASPort VARCHAR(255),
NASPortType INT
UNSIGNED
NOT NULL
,
NASPortType
@
INT
_
UNSIGNED
@
,
CallingStationID VARCHAR(255)
NOT NULL
,
CallingStationID VARCHAR(255),
CalledStationID VARCHAR(255)
NOT NULL
,
CalledStationID VARCHAR(255),
NASPortID VARCHAR(255)
NOT NULL
,
NASPortID VARCHAR(255),
AcctSessionID VARCHAR(255)
NOT NULL
,
AcctSessionID VARCHAR(255),
FramedIPAddress VARCHAR(16)
NOT NULL
,
FramedIPAddress VARCHAR(16),
AcctAuthentic INT
UNSIGNED
NOT NULL
,
AcctAuthentic
@
INT
_
UNSIGNED
@
,
EventTimestamp DATETIME
NOT NULL
,
EventTimestamp DATETIME,
NASIdentifier VARCHAR(255)
NOT NULL
,
NASIdentifier VARCHAR(255),
NASIPAddress VARCHAR(16)
NOT NULL
,
NASIPAddress VARCHAR(16),
AcctDelayTime INT
UNSIGNED
NOT NULL
,
AcctDelayTime
@
INT
_
UNSIGNED
@
,
AcctSessionTime INT
UNSIGNED
NOT NULL
,
AcctSessionTime
@
INT
_
UNSIGNED
@
,
AcctInputOctets INT
UNSIGNED
NOT NULL
,
AcctInputOctets
@
INT
_
UNSIGNED
@
,
AcctInputGigawords INT
UNSIGNED
NOT NULL
,
AcctInputGigawords
@
INT
_
UNSIGNED
@
,
AcctInputPackets INT
UNSIGNED
NOT NULL
,
AcctInputPackets
@
INT
_
UNSIGNED
@
,
AcctOutputOctets INT
UNSIGNED
NOT NULL
,
AcctOutputOctets
@
INT
_
UNSIGNED
@
,
AcctOutputGigawords INT
UNSIGNED
NOT NULL
,
AcctOutputGigawords
@
INT
_
UNSIGNED
@
,
AcctOutputPackets INT
UNSIGNED
NOT NULL
,
AcctOutputPackets
@
INT
_
UNSIGNED
@
,
AcctStatusType INT
UNSIGNED
NOT NULL
,
AcctStatusType
@
INT
_
UNSIGNED
@
,
AcctTerminateCause INT
UNSIGNED
NOT NULL
AcctTerminateCause
@
INT
_
UNSIGNED
@
) @CREATE_TABLE_SUFFIX@;
CREATE INDEX @PREFIX@accounting_idx1 ON @PREFIX@accounting (Username);
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