Example #1
0
func Migrate() error {
	err := users.Migrate()
	if err != nil {
		return err
	}

	err = oauth.Migrate()
	if err != nil {
		return err
	}

	err = apps.Migrate()
	if err != nil {
		return err
	}

	err = history.Migrate()
	if err != nil {
		return err
	}

	err = machines.Migrate()
	if err != nil {
		return err
	}

	err = config.Migrate()
	if err != nil {
		return err
	}

	return nil
}
Example #2
0
func Migrate() error {
	err := users.Migrate()
	if err != nil {
		log.Error("users migration failed")
		return err
	}

	err = oauth.Migrate()
	if err != nil {
		log.Error("oauth migration failed")
		return err
	}

	err = apps.Migrate()
	if err != nil {
		log.Error("apps migration failed")
		return err
	}

	err = history.Migrate()
	if err != nil {
		log.Error("history migration failed")
		return err
	}

	err = machines.Migrate()
	if err != nil {
		log.Error("machines migration failed")
		return err
	}

	err = config.Migrate()
	if err != nil {
		log.Error("config migration failed")
		return err
	}

	return nil
}