Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tank
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
tank
Commits
5acb90f0
Verified
Commit
5acb90f0
authored
5 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
fix: remove unused code for MySQL
parent
cabbe88a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
store/migrations.go
+0
-4
0 additions, 4 deletions
store/migrations.go
store/store.go
+0
-22
0 additions, 22 deletions
store/store.go
store/store_test.go
+0
-5
0 additions, 5 deletions
store/store_test.go
with
0 additions
and
31 deletions
store/migrations.go
+
0
−
4
View file @
5acb90f0
...
...
@@ -364,10 +364,6 @@ func (st *Store) initDBModel(cfg DBConfig) (err error) {
opts
.
TableName
=
migrationsTn
opts
.
IDColumnSize
=
64
opts
.
UseTransaction
=
true
if
cfg
.
Type
==
"mysql"
{
// mySQl does not support DDL commands inside transactions
opts
.
UseTransaction
=
false
}
m
:=
gormigrate
.
New
(
st
.
db
,
opts
,
dbMigrations
)
m
.
InitSchema
(
initialMigration
)
...
...
This diff is collapsed.
Click to expand it.
store/store.go
+
0
−
22
View file @
5acb90f0
...
...
@@ -40,28 +40,6 @@ type Store struct {
// Initialization and Destruction
//
func
mysqlConnectionString
(
cfg
DBConfig
)
(
conn
string
)
{
// "tank:aura@tcp(127.0.0.1:3306)/tank?charset=utf8&parseTime=True&loc=Local"
conn
=
cfg
.
Username
if
cfg
.
Password
!=
""
{
conn
+=
":"
+
cfg
.
Password
}
if
cfg
.
Port
>
0
{
conn
+=
fmt
.
Sprintf
(
"@tcp(%s:%d)"
,
cfg
.
Host
,
cfg
.
Port
)
}
else
{
conn
+=
"@tcp("
+
cfg
.
Host
+
")"
}
conn
+=
"/"
+
cfg
.
DB
+
"?parseTime=True&loc=Local"
if
cfg
.
TLS
!=
""
{
conn
+=
"&tls="
+
cfg
.
TLS
}
if
cfg
.
Charset
!=
""
{
conn
+=
"&charset="
+
cfg
.
Charset
}
return
}
func
postgresConnectionString
(
cfg
DBConfig
)
(
conn
string
)
{
// "host=127.0.0.1 port=5432 user=tank password=aura dbname=tank sslmode=disable"
conn
=
"host="
+
cfg
.
Host
...
...
This diff is collapsed.
Click to expand it.
store/store_test.go
+
0
−
5
View file @
5acb90f0
...
...
@@ -54,16 +54,11 @@ var (
func
testDBConfig
()
(
cfg
DBConfig
)
{
cfg
.
Type
=
os
.
Getenv
(
"AURA_TANK_TEST_DB_TYPE"
)
if
cfg
.
Type
==
""
{
cfg
.
Type
=
"mysql"
}
cfg
.
Host
=
os
.
Getenv
(
"AURA_TANK_TEST_DB_HOST"
)
if
cfg
.
Host
==
""
{
cfg
.
Host
=
"127.0.0.1"
}
switch
cfg
.
Type
{
case
"mysql"
:
cfg
.
TLS
=
"false"
case
"postgres"
:
cfg
.
TLS
=
"disable"
}
...
...
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