fix(mysql): fix for migration in newly added temp_user table, fixes #2509

This commit is contained in:
Torkel Ödegaard
2015-08-14 09:40:53 +02:00
parent 2f849be9d8
commit 16fa5c4df3
2 changed files with 2 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ func addTempUserMigrations(mg *Migrator) {
{Name: "invited_by_user_id", Type: DB_BigInt, Nullable: true},
{Name: "email_sent", Type: DB_Bool},
{Name: "email_sent_on", Type: DB_DateTime, Nullable: true},
{Name: "remote_addr", Type: DB_Varchar, Nullable: true},
{Name: "remote_addr", Type: DB_Varchar, Length: 255, Nullable: true},
{Name: "created", Type: DB_DateTime},
{Name: "updated", Type: DB_DateTime},
},

View File

@@ -100,6 +100,7 @@ func (mg *Migrator) Start() error {
}
if err := mg.exec(m); err != nil {
log.Error(3, "Migrator: error: \n%s:\n%s", err, sql)
record.Error = err.Error()
mg.x.Insert(&record)
return err