title: Gorm AutoMigrate() and CreateTable() not working
body: <p>I have run through the related issues here and all over on google.</p>
  
  <p>I am using Gorm with SQLite3.</p>
  
  <p>Whenever I try to run either function on my struct, I get an error. When I debug and step through I see table name is "". Gorm is not getting my structs name which is models.UserAuth. If I call DropTable(models.UserAuth{}) to shows there is no table named user_auth (but at least it figured out the table name). When I browse the DB, of course there, are no tables.</p>
  
  <p>my struct is</p>
  
  <pre><code>type UserAuth struct {
      gorm.Model
      ProfileID int      `gorm:"not null" json:"profile_id"`
      Username  string   `gorm:"size:20;unique_index" json:"username"`
      Email     string   `gorm:"type:varchar(100);unique_index" json:"email"`
      Password  string   `gorm:"not null" json:"password"`
      Remember  bool     `gorm:"not null" json:"remeber"`
      TwoFA     bool     `gorm:"not null" json:"twofa"`
      Access    int      `gorm:"not null" json:"access"`
      State     int      `gorm:"not null" json:"state"`
      LastSeen  string   `gorm:"not null" json:"lastseen"``
  }
  </code></pre>
  
  <p>My COMMON migrate function is:</p>
  
  <pre><code>func (d *Database) Migrate(m interface{}) {
      logEntry := fmt.Sprintf("Auto Migrating %s...", reflect.TypeOf(m))
  
      //d.db.DropTable(&amp;models.UserAuth{})
      //d.db.CreateTable(&amp;models.UserAuth{})
  
      // Do it the hard way
      //if d.db.HasTable(&amp;m) == false {
      // Create table for model `User`
      //  d.db.CreateTable(&amp;m)
      //  d.logThis.Info(fmt.Sprintf("%s %s with error %s", logEntry, "Failed", d.db.Error))
      //}
  
      // Migrate the schema
      db := d.db.AutoMigrate(&amp;m) //&lt;--- Line 84
      if db != nil &amp;&amp; db.Error != nil {
          //We have an error
          d.logThis.Fatal(fmt.Sprintf("%s %s with error %s", logEntry, "Failed", db.Error))
      }
      d.logThis.Info(fmt.Sprintf("%s %s", logEntry, "Success"))
  }
  </code></pre>
  
  <p>And finally here is how it is being called:</p>
  
  <pre><code>app.Db.Migrate(models.UserAuth{})
  </code></pre>
  
  <p>Actual output with debug on:</p>
  
  <pre><code>({PathToProject}/database/database.go:84) 
  [2018-07-23 06:12:24]  near ")": syntax error 
  
  ({PathToProject}/database/database.go:84) 
  [2018-07-23 06:12:24]  [0.99ms]  CREATE TABLE "" ( )  
  [0 rows affected or returned ] 
  </code></pre>
  
  <p>FYI, the downvote was uncalled for - It is a legitimate issue as I have taken the gorm example on the document summary page and basically just changed the struct. And the struct is using the correct basic types (except for the slice that made it back into the code on the original post) and the error is not very helpful. I see there is a SYNTAX error before the blank table name error - but why? Did I give GORM a valid struct?</p>