diff --git a/webapp/backend/pkg/database/scrutiny_repository_migrations.go b/webapp/backend/pkg/database/scrutiny_repository_migrations.go index 0e299fa..c7cedd2 100644 --- a/webapp/backend/pkg/database/scrutiny_repository_migrations.go +++ b/webapp/backend/pkg/database/scrutiny_repository_migrations.go @@ -63,12 +63,22 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error { } //TODO: migrate the data from GORM to influxdb. - + //get a list of all devices: + // get a list of all smart scans in the last 2 weeks: + // get a list of associated smart attribute data: + // translate to a collector.SmartInfo object + // call scrutinyRepository.SaveSmartAttributes + // get a list of all smart scans in the last 9 weeks: + // do same as above (select 1 scan per week) + // get a list of all smart scans in the last 25 months: + // do same as above (select 1 scan per month) + // get a list of all smart scans: + // do same as above (select 1 scan per year) return nil }, }, //{ - // ID: "20220503120000", // v0.4.0 - influxdb schema + // ID: "20220503120000", // cleanup - v0.4.0 - influxdb schema // Migrate: func(tx *gorm.DB) error { // // delete unnecessary tables. // err := tx.Migrator().DropTable(