mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
All migrations work in sqlite3, mysql and postgres
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,3 +21,4 @@ src/css/*.min.css
|
||||
/grafana
|
||||
|
||||
grafana.custom.ini
|
||||
fig.yml
|
||||
|
@@ -1,7 +0,0 @@
|
||||
influxdb:
|
||||
build: blocks/influxdb
|
||||
ports:
|
||||
- "2004:2004"
|
||||
- "8083:8083"
|
||||
- "8086:8086"
|
||||
|
@@ -57,7 +57,7 @@ func addUserMigrations(mg *Migrator) {
|
||||
&Column{Name: "org_id", Type: DB_BigInt, Nullable: false},
|
||||
&Column{Name: "is_admin", Type: DB_Bool, Nullable: false},
|
||||
&Column{Name: "email_verified", Type: DB_Bool, Nullable: true},
|
||||
&Column{Name: "theme", Type: DB_NVarchar, Nullable: true},
|
||||
&Column{Name: "theme", Type: DB_NVarchar, Length: 255, Nullable: true},
|
||||
&Column{Name: "created", Type: DB_DateTime, Nullable: false},
|
||||
&Column{Name: "updated", Type: DB_DateTime, Nullable: false},
|
||||
},
|
||||
|
@@ -125,7 +125,7 @@ func (mg *Migrator) exec(m Migration) error {
|
||||
results, err := sess.Query(sql, args...)
|
||||
if err != nil || len(results) == 0 {
|
||||
log.Info("Migrator: skipping migration id: %v, condition not fulfilled", m.Id())
|
||||
return nil
|
||||
return sess.Rollback()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user