Add session migration
This commit is contained in:
		@@ -13,7 +13,6 @@ func RunAllMigrations(app *app.App) error {
 | 
			
		||||
		Id:        1, // Id is handled automatically, but it is added here to show it will be skipped during column creation
 | 
			
		||||
		Username:  "migrate",
 | 
			
		||||
		Password:  "migrate",
 | 
			
		||||
		AuthToken: "migrate",
 | 
			
		||||
		CreatedAt: time.Now(),
 | 
			
		||||
		UpdatedAt: time.Now(),
 | 
			
		||||
	}
 | 
			
		||||
@@ -22,5 +21,16 @@ func RunAllMigrations(app *app.App) error {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	session := Session{
 | 
			
		||||
		Id:        1,
 | 
			
		||||
		UserId:    1,
 | 
			
		||||
		AuthToken: "migrate",
 | 
			
		||||
		CreatedAt: time.Now(),
 | 
			
		||||
	}
 | 
			
		||||
	err = database.Migrate(app, session)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user