From c708fc59934cadef633306304e16b886e960cde0 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Thu, 21 Mar 2024 11:05:56 -0400 Subject: [PATCH 1/2] Zero functional changes, just renumbering (but not reordering) migrations to leave gaps for continued refinement prior to our first "release". --- migration/src/lib.rs | 96 +++++++++---------- ...nums.rs => m0000010_create_cvss3_enums.rs} | 0 ...nums.rs => m0000020_create_cvss4_enums.rs} | 0 ...create_sbom.rs => m0000030_create_sbom.rs} | 0 ...ty.rs => m0000040_create_vulnerability.rs} | 0 ...00050_create_vulnerability_description.rs} | 4 +- ...dvisory.rs => m0000060_create_advisory.rs} | 0 ...eate_cvss3.rs => m0000070_create_cvss3.rs} | 4 +- ...eate_cvss4.rs => m0000080_create_cvss4.rs} | 4 +- ...m0000090_create_advisory_vulnerability.rs} | 4 +- ..._package.rs => m0000100_create_package.rs} | 0 ...5_create_cpe.rs => m0000110_create_cpe.rs} | 0 ....rs => m0000120_create_package_version.rs} | 2 +- ...s => m0000130_create_qualified_package.rs} | 2 +- ... m0000140_create_package_version_range.rs} | 2 +- ..._create_affected_package_version_range.rs} | 4 +- ... m0000160_create_fixed_package_version.rs} | 4 +- ...70_create_not_affected_package_version.rs} | 4 +- ...s => m0000180_create_package_qualifier.rs} | 2 +- ..._cpe.rs => m0000190_sbom_describes_cpe.rs} | 4 +- ....rs => m0000200_sbom_describes_package.rs} | 4 +- ...hip.rs => m0000210_create_relationship.rs} | 0 ...0220_create_package_relates_to_package.rs} | 6 +- ..._qualified_package_transitive_function.rs} | 0 ...mporter.rs => m0000240_create_importer.rs} | 0 25 files changed, 73 insertions(+), 73 deletions(-) rename migration/src/{m0000001_create_cvss3_enums.rs => m0000010_create_cvss3_enums.rs} (100%) rename migration/src/{m0000002_create_cvss4_enums.rs => m0000020_create_cvss4_enums.rs} (100%) rename migration/src/{m0000010_create_sbom.rs => m0000030_create_sbom.rs} (100%) rename migration/src/{m0000011_create_vulnerability.rs => m0000040_create_vulnerability.rs} (100%) rename migration/src/{m0000012_create_vulnerability_description.rs => m0000050_create_vulnerability_description.rs} (95%) rename migration/src/{m0000030_create_advisory.rs => m0000060_create_advisory.rs} (100%) rename migration/src/{m0000033_create_cvss3.rs => m0000070_create_cvss3.rs} (97%) rename migration/src/{m0000034_create_cvss4.rs => m0000080_create_cvss4.rs} (98%) rename migration/src/{m0000032_create_advisory_vulnerability.rs => m0000090_create_advisory_vulnerability.rs} (95%) rename migration/src/{m0000040_create_package.rs => m0000100_create_package.rs} (100%) rename migration/src/{m0000035_create_cpe.rs => m0000110_create_cpe.rs} (100%) rename migration/src/{m0000042_create_package_version.rs => m0000120_create_package_version.rs} (97%) rename migration/src/{m0000044_create_qualified_package.rs => m0000130_create_qualified_package.rs} (96%) rename migration/src/{m0000046_create_package_version_range.rs => m0000140_create_package_version_range.rs} (97%) rename migration/src/{m0000047_create_affected_package_version_range.rs => m0000150_create_affected_package_version_range.rs} (95%) rename migration/src/{m0000048_create_fixed_package_version.rs => m0000160_create_fixed_package_version.rs} (95%) rename migration/src/{m0000049_create_not_affected_package_version.rs => m0000170_create_not_affected_package_version.rs} (95%) rename migration/src/{m0000050_create_package_qualifier.rs => m0000180_create_package_qualifier.rs} (96%) rename migration/src/{m0000180_sbom_describes_cpe.rs => m0000190_sbom_describes_cpe.rs} (96%) rename migration/src/{m0000190_sbom_describes_package.rs => m0000200_sbom_describes_package.rs} (95%) rename migration/src/{m0000200_create_relationship.rs => m0000210_create_relationship.rs} (100%) rename migration/src/{m0000210_create_package_relates_to_package.rs => m0000220_create_package_relates_to_package.rs} (95%) rename migration/src/{m0000220_create_qualified_package_transitive_function.rs => m0000230_create_qualified_package_transitive_function.rs} (100%) rename migration/src/{m0000230_create_importer.rs => m0000240_create_importer.rs} (100%) diff --git a/migration/src/lib.rs b/migration/src/lib.rs index d269cb437..55636b697 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -1,31 +1,31 @@ pub use sea_orm_migration::prelude::*; -mod m0000010_create_sbom; -mod m0000011_create_vulnerability; -mod m0000030_create_advisory; -pub mod m0000032_create_advisory_vulnerability; -mod m0000040_create_package; -mod m0000042_create_package_version; -mod m0000044_create_qualified_package; -mod m0000046_create_package_version_range; -mod m0000047_create_affected_package_version_range; -mod m0000048_create_fixed_package_version; -mod m0000049_create_not_affected_package_version; -mod m0000050_create_package_qualifier; +mod m0000030_create_sbom; +mod m0000040_create_vulnerability; +mod m0000060_create_advisory; +pub mod m0000090_create_advisory_vulnerability; +mod m0000100_create_package; +mod m0000120_create_package_version; +mod m0000130_create_qualified_package; +mod m0000140_create_package_version_range; +mod m0000150_create_affected_package_version_range; +mod m0000160_create_fixed_package_version; +mod m0000170_create_not_affected_package_version; +mod m0000180_create_package_qualifier; mod m0000070_create_cwe; -mod m0000180_sbom_describes_cpe; -mod m0000190_sbom_describes_package; -mod m0000200_create_relationship; -mod m0000210_create_package_relates_to_package; +mod m0000190_sbom_describes_cpe; +mod m0000200_sbom_describes_package; +mod m0000210_create_relationship; +mod m0000220_create_package_relates_to_package; -mod m0000001_create_cvss3_enums; -mod m0000002_create_cvss4_enums; -mod m0000012_create_vulnerability_description; -mod m0000033_create_cvss3; -mod m0000034_create_cvss4; -mod m0000035_create_cpe; -mod m0000220_create_qualified_package_transitive_function; -mod m0000230_create_importer; +mod m0000010_create_cvss3_enums; +mod m0000020_create_cvss4_enums; +mod m0000050_create_vulnerability_description; +mod m0000070_create_cvss3; +mod m0000080_create_cvss4; +mod m0000110_create_cpe; +mod m0000230_create_qualified_package_transitive_function; +mod m0000240_create_importer; pub struct Migrator; @@ -33,30 +33,30 @@ pub struct Migrator; impl MigratorTrait for Migrator { fn migrations() -> Vec> { vec![ - Box::new(m0000001_create_cvss3_enums::Migration), - Box::new(m0000002_create_cvss4_enums::Migration), - Box::new(m0000010_create_sbom::Migration), - Box::new(m0000011_create_vulnerability::Migration), - Box::new(m0000012_create_vulnerability_description::Migration), - Box::new(m0000030_create_advisory::Migration), - Box::new(m0000033_create_cvss3::Migration), - Box::new(m0000034_create_cvss4::Migration), - Box::new(m0000032_create_advisory_vulnerability::Migration), - Box::new(m0000040_create_package::Migration), - Box::new(m0000035_create_cpe::Migration), - Box::new(m0000042_create_package_version::Migration), - Box::new(m0000044_create_qualified_package::Migration), - Box::new(m0000046_create_package_version_range::Migration), - Box::new(m0000047_create_affected_package_version_range::Migration), - Box::new(m0000048_create_fixed_package_version::Migration), - Box::new(m0000049_create_not_affected_package_version::Migration), - Box::new(m0000050_create_package_qualifier::Migration), - Box::new(m0000180_sbom_describes_cpe::Migration), - Box::new(m0000190_sbom_describes_package::Migration), - Box::new(m0000200_create_relationship::Migration), - Box::new(m0000210_create_package_relates_to_package::Migration), - Box::new(m0000220_create_qualified_package_transitive_function::Migration), - Box::new(m0000230_create_importer::Migration), + Box::new(m0000010_create_cvss3_enums::Migration), + Box::new(m0000020_create_cvss4_enums::Migration), + Box::new(m0000030_create_sbom::Migration), + Box::new(m0000040_create_vulnerability::Migration), + Box::new(m0000050_create_vulnerability_description::Migration), + Box::new(m0000060_create_advisory::Migration), + Box::new(m0000070_create_cvss3::Migration), + Box::new(m0000080_create_cvss4::Migration), + Box::new(m0000090_create_advisory_vulnerability::Migration), + Box::new(m0000100_create_package::Migration), + Box::new(m0000110_create_cpe::Migration), + Box::new(m0000120_create_package_version::Migration), + Box::new(m0000130_create_qualified_package::Migration), + Box::new(m0000140_create_package_version_range::Migration), + Box::new(m0000150_create_affected_package_version_range::Migration), + Box::new(m0000160_create_fixed_package_version::Migration), + Box::new(m0000170_create_not_affected_package_version::Migration), + Box::new(m0000180_create_package_qualifier::Migration), + Box::new(m0000190_sbom_describes_cpe::Migration), + Box::new(m0000200_sbom_describes_package::Migration), + Box::new(m0000210_create_relationship::Migration), + Box::new(m0000220_create_package_relates_to_package::Migration), + Box::new(m0000230_create_qualified_package_transitive_function::Migration), + Box::new(m0000240_create_importer::Migration), ] } } diff --git a/migration/src/m0000001_create_cvss3_enums.rs b/migration/src/m0000010_create_cvss3_enums.rs similarity index 100% rename from migration/src/m0000001_create_cvss3_enums.rs rename to migration/src/m0000010_create_cvss3_enums.rs diff --git a/migration/src/m0000002_create_cvss4_enums.rs b/migration/src/m0000020_create_cvss4_enums.rs similarity index 100% rename from migration/src/m0000002_create_cvss4_enums.rs rename to migration/src/m0000020_create_cvss4_enums.rs diff --git a/migration/src/m0000010_create_sbom.rs b/migration/src/m0000030_create_sbom.rs similarity index 100% rename from migration/src/m0000010_create_sbom.rs rename to migration/src/m0000030_create_sbom.rs diff --git a/migration/src/m0000011_create_vulnerability.rs b/migration/src/m0000040_create_vulnerability.rs similarity index 100% rename from migration/src/m0000011_create_vulnerability.rs rename to migration/src/m0000040_create_vulnerability.rs diff --git a/migration/src/m0000012_create_vulnerability_description.rs b/migration/src/m0000050_create_vulnerability_description.rs similarity index 95% rename from migration/src/m0000012_create_vulnerability_description.rs rename to migration/src/m0000050_create_vulnerability_description.rs index e0eb2e0f5..5fce1601f 100644 --- a/migration/src/m0000012_create_vulnerability_description.rs +++ b/migration/src/m0000050_create_vulnerability_description.rs @@ -1,5 +1,5 @@ -use crate::m0000011_create_vulnerability::Vulnerability; -use crate::m0000032_create_advisory_vulnerability::AdvisoryVulnerability; +use crate::m0000040_create_vulnerability::Vulnerability; +use crate::m0000090_create_advisory_vulnerability::AdvisoryVulnerability; use sea_orm_migration::prelude::*; use crate::Now; diff --git a/migration/src/m0000030_create_advisory.rs b/migration/src/m0000060_create_advisory.rs similarity index 100% rename from migration/src/m0000030_create_advisory.rs rename to migration/src/m0000060_create_advisory.rs diff --git a/migration/src/m0000033_create_cvss3.rs b/migration/src/m0000070_create_cvss3.rs similarity index 97% rename from migration/src/m0000033_create_cvss3.rs rename to migration/src/m0000070_create_cvss3.rs index 3fc0204a1..b7578c34a 100644 --- a/migration/src/m0000033_create_cvss3.rs +++ b/migration/src/m0000070_create_cvss3.rs @@ -1,7 +1,7 @@ -use crate::m0000001_create_cvss3_enums::{ +use crate::m0000010_create_cvss3_enums::{ Cvss3A, Cvss3Ac, Cvss3Av, Cvss3C, Cvss3I, Cvss3Pr, Cvss3S, Cvss3Ui, }; -use crate::m0000030_create_advisory::Advisory; +use crate::m0000060_create_advisory::Advisory; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000034_create_cvss4.rs b/migration/src/m0000080_create_cvss4.rs similarity index 98% rename from migration/src/m0000034_create_cvss4.rs rename to migration/src/m0000080_create_cvss4.rs index cbf57e204..74443aa60 100644 --- a/migration/src/m0000034_create_cvss4.rs +++ b/migration/src/m0000080_create_cvss4.rs @@ -1,8 +1,8 @@ -use crate::m0000002_create_cvss4_enums::{ +use crate::m0000020_create_cvss4_enums::{ Cvss4Ac, Cvss4At, Cvss4Av, Cvss4Pr, Cvss4Sa, Cvss4Sc, Cvss4Si, Cvss4Ui, Cvss4Va, Cvss4Vc, Cvss4Vi, }; -use crate::m0000030_create_advisory::Advisory; +use crate::m0000060_create_advisory::Advisory; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000032_create_advisory_vulnerability.rs b/migration/src/m0000090_create_advisory_vulnerability.rs similarity index 95% rename from migration/src/m0000032_create_advisory_vulnerability.rs rename to migration/src/m0000090_create_advisory_vulnerability.rs index 095e6a42e..719c004c4 100644 --- a/migration/src/m0000032_create_advisory_vulnerability.rs +++ b/migration/src/m0000090_create_advisory_vulnerability.rs @@ -1,5 +1,5 @@ -use crate::m0000011_create_vulnerability::Vulnerability; -use crate::m0000030_create_advisory::Advisory; +use crate::m0000040_create_vulnerability::Vulnerability; +use crate::m0000060_create_advisory::Advisory; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000040_create_package.rs b/migration/src/m0000100_create_package.rs similarity index 100% rename from migration/src/m0000040_create_package.rs rename to migration/src/m0000100_create_package.rs diff --git a/migration/src/m0000035_create_cpe.rs b/migration/src/m0000110_create_cpe.rs similarity index 100% rename from migration/src/m0000035_create_cpe.rs rename to migration/src/m0000110_create_cpe.rs diff --git a/migration/src/m0000042_create_package_version.rs b/migration/src/m0000120_create_package_version.rs similarity index 97% rename from migration/src/m0000042_create_package_version.rs rename to migration/src/m0000120_create_package_version.rs index 69b366df7..248b384d7 100644 --- a/migration/src/m0000042_create_package_version.rs +++ b/migration/src/m0000120_create_package_version.rs @@ -1,4 +1,4 @@ -use crate::m0000040_create_package::Package; +use crate::m0000100_create_package::Package; use sea_orm_migration::prelude::*; use crate::Now; diff --git a/migration/src/m0000044_create_qualified_package.rs b/migration/src/m0000130_create_qualified_package.rs similarity index 96% rename from migration/src/m0000044_create_qualified_package.rs rename to migration/src/m0000130_create_qualified_package.rs index 47128aeae..305e1c994 100644 --- a/migration/src/m0000044_create_qualified_package.rs +++ b/migration/src/m0000130_create_qualified_package.rs @@ -1,4 +1,4 @@ -use crate::m0000042_create_package_version::PackageVersion; +use crate::m0000120_create_package_version::PackageVersion; use sea_orm_migration::prelude::*; use crate::Now; diff --git a/migration/src/m0000046_create_package_version_range.rs b/migration/src/m0000140_create_package_version_range.rs similarity index 97% rename from migration/src/m0000046_create_package_version_range.rs rename to migration/src/m0000140_create_package_version_range.rs index cb4403df9..585e50c3d 100644 --- a/migration/src/m0000046_create_package_version_range.rs +++ b/migration/src/m0000140_create_package_version_range.rs @@ -1,4 +1,4 @@ -use crate::m0000040_create_package::Package; +use crate::m0000100_create_package::Package; use sea_orm_migration::prelude::*; use crate::Now; diff --git a/migration/src/m0000047_create_affected_package_version_range.rs b/migration/src/m0000150_create_affected_package_version_range.rs similarity index 95% rename from migration/src/m0000047_create_affected_package_version_range.rs rename to migration/src/m0000150_create_affected_package_version_range.rs index 014ad91cd..91e92e1f4 100644 --- a/migration/src/m0000047_create_affected_package_version_range.rs +++ b/migration/src/m0000150_create_affected_package_version_range.rs @@ -1,5 +1,5 @@ -use crate::m0000030_create_advisory::Advisory; -use crate::m0000046_create_package_version_range::PackageVersionRange; +use crate::m0000060_create_advisory::Advisory; +use crate::m0000140_create_package_version_range::PackageVersionRange; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000048_create_fixed_package_version.rs b/migration/src/m0000160_create_fixed_package_version.rs similarity index 95% rename from migration/src/m0000048_create_fixed_package_version.rs rename to migration/src/m0000160_create_fixed_package_version.rs index 5144a4da8..35454eed7 100644 --- a/migration/src/m0000048_create_fixed_package_version.rs +++ b/migration/src/m0000160_create_fixed_package_version.rs @@ -1,5 +1,5 @@ -use crate::m0000030_create_advisory::Advisory; -use crate::m0000042_create_package_version::PackageVersion; +use crate::m0000060_create_advisory::Advisory; +use crate::m0000120_create_package_version::PackageVersion; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000049_create_not_affected_package_version.rs b/migration/src/m0000170_create_not_affected_package_version.rs similarity index 95% rename from migration/src/m0000049_create_not_affected_package_version.rs rename to migration/src/m0000170_create_not_affected_package_version.rs index a0a308e69..baf28f654 100644 --- a/migration/src/m0000049_create_not_affected_package_version.rs +++ b/migration/src/m0000170_create_not_affected_package_version.rs @@ -1,5 +1,5 @@ -use crate::m0000030_create_advisory::Advisory; -use crate::m0000042_create_package_version::PackageVersion; +use crate::m0000060_create_advisory::Advisory; +use crate::m0000120_create_package_version::PackageVersion; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000050_create_package_qualifier.rs b/migration/src/m0000180_create_package_qualifier.rs similarity index 96% rename from migration/src/m0000050_create_package_qualifier.rs rename to migration/src/m0000180_create_package_qualifier.rs index 6a1b9bf58..a519af680 100644 --- a/migration/src/m0000050_create_package_qualifier.rs +++ b/migration/src/m0000180_create_package_qualifier.rs @@ -1,4 +1,4 @@ -use crate::m0000044_create_qualified_package::QualifiedPackage; +use crate::m0000130_create_qualified_package::QualifiedPackage; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000180_sbom_describes_cpe.rs b/migration/src/m0000190_sbom_describes_cpe.rs similarity index 96% rename from migration/src/m0000180_sbom_describes_cpe.rs rename to migration/src/m0000190_sbom_describes_cpe.rs index e854b0ef8..2ec294151 100644 --- a/migration/src/m0000180_sbom_describes_cpe.rs +++ b/migration/src/m0000190_sbom_describes_cpe.rs @@ -1,5 +1,5 @@ -use crate::m0000010_create_sbom::Sbom; -use crate::m0000035_create_cpe::Cpe; +use crate::m0000030_create_sbom::Sbom; +use crate::m0000110_create_cpe::Cpe; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000190_sbom_describes_package.rs b/migration/src/m0000200_sbom_describes_package.rs similarity index 95% rename from migration/src/m0000190_sbom_describes_package.rs rename to migration/src/m0000200_sbom_describes_package.rs index 769def0f4..ee8eb37d8 100644 --- a/migration/src/m0000190_sbom_describes_package.rs +++ b/migration/src/m0000200_sbom_describes_package.rs @@ -1,5 +1,5 @@ -use crate::m0000010_create_sbom::Sbom; -use crate::m0000044_create_qualified_package::QualifiedPackage; +use crate::m0000030_create_sbom::Sbom; +use crate::m0000130_create_qualified_package::QualifiedPackage; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000200_create_relationship.rs b/migration/src/m0000210_create_relationship.rs similarity index 100% rename from migration/src/m0000200_create_relationship.rs rename to migration/src/m0000210_create_relationship.rs diff --git a/migration/src/m0000210_create_package_relates_to_package.rs b/migration/src/m0000220_create_package_relates_to_package.rs similarity index 95% rename from migration/src/m0000210_create_package_relates_to_package.rs rename to migration/src/m0000220_create_package_relates_to_package.rs index 04f5cf9c3..c0e73c77e 100644 --- a/migration/src/m0000210_create_package_relates_to_package.rs +++ b/migration/src/m0000220_create_package_relates_to_package.rs @@ -1,6 +1,6 @@ -use crate::m0000010_create_sbom::Sbom; -use crate::m0000044_create_qualified_package::QualifiedPackage; -use crate::m0000200_create_relationship::Relationship; +use crate::m0000030_create_sbom::Sbom; +use crate::m0000130_create_qualified_package::QualifiedPackage; +use crate::m0000210_create_relationship::Relationship; use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] diff --git a/migration/src/m0000220_create_qualified_package_transitive_function.rs b/migration/src/m0000230_create_qualified_package_transitive_function.rs similarity index 100% rename from migration/src/m0000220_create_qualified_package_transitive_function.rs rename to migration/src/m0000230_create_qualified_package_transitive_function.rs diff --git a/migration/src/m0000230_create_importer.rs b/migration/src/m0000240_create_importer.rs similarity index 100% rename from migration/src/m0000230_create_importer.rs rename to migration/src/m0000240_create_importer.rs From 0b916afca14d9fc0a1551eb68bff15d6b3c0e4b1 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Thu, 21 Mar 2024 11:11:47 -0400 Subject: [PATCH 2/2] Formatting! --- migration/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/src/lib.rs b/migration/src/lib.rs index 55636b697..af67aee08 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -3,6 +3,7 @@ pub use sea_orm_migration::prelude::*; mod m0000030_create_sbom; mod m0000040_create_vulnerability; mod m0000060_create_advisory; +mod m0000070_create_cwe; pub mod m0000090_create_advisory_vulnerability; mod m0000100_create_package; mod m0000120_create_package_version; @@ -12,7 +13,6 @@ mod m0000150_create_affected_package_version_range; mod m0000160_create_fixed_package_version; mod m0000170_create_not_affected_package_version; mod m0000180_create_package_qualifier; -mod m0000070_create_cwe; mod m0000190_sbom_describes_cpe; mod m0000200_sbom_describes_package; mod m0000210_create_relationship;