Skip to content

Remove id field from "Create" models #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tuxtape-server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
GenerationConfig {
connection_type: "crate::connection::AnyConnection".to_string(),
options: GenerationConfigOpts {
default_table_options: TableOptions::default().disable_serde(),
default_table_options: TableOptions::default()
.disable_serde()
.autogenerated_columns(vec!["id"]),
once_common_structs: true,
once_connection_type: true,
..Default::default()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ pub struct Cve {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=cve)]
pub struct CreateCve {
/// Field representing column `id`
pub id: i32,
/// Field representing column `cve_id`
pub cve_id: String,
/// Field representing column `vulnerability_id`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub struct KernelFile {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=kernel_file)]
pub struct CreateKernelFile {
/// Field representing column `id`
pub id: i32,
/// Field representing column `kernel_release_id`
pub kernel_release_id: i32,
/// Field representing column `file_path`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub struct KernelRelease {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=kernel_release)]
pub struct CreateKernelRelease {
/// Field representing column `id`
pub id: i32,
/// Field representing column `mainline_kernel_release_id`
pub mainline_kernel_release_id: i32,
/// Field representing column `version_local`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub struct KernelSource {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=kernel_source)]
pub struct CreateKernelSource {
/// Field representing column `id`
pub id: i32,
/// Field representing column `kernel_release_id`
pub kernel_release_id: i32,
/// Field representing column `url`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ pub struct MainlineKernelRelease {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=mainline_kernel_release)]
pub struct CreateMainlineKernelRelease {
/// Field representing column `id`
pub id: i32,
/// Field representing column `version_major`
pub version_major: i32,
/// Field representing column `version_minor`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ pub struct Meta {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=meta)]
pub struct CreateMeta {
/// Field representing column `id`
pub id: i32,
/// Field representing column `based_on_vulns_commit`
pub based_on_vulns_commit: String,
/// Field representing column `last_run_unix_time`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ pub struct Vulnerability {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=vulnerability)]
pub struct CreateVulnerability {
/// Field representing column `id`
pub id: i32,
/// Field representing column `description`
pub description: Option<String>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ pub struct VulnerabilityInstance {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=vulnerability_instance)]
pub struct CreateVulnerabilityInstance {
/// Field representing column `id`
pub id: i32,
/// Field representing column `vulnerability_id`
pub vulnerability_id: i32,
/// Field representing column `description`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub struct VulnerabilityInstanceAffectedFile {
#[derive(Debug, Clone, diesel::Insertable)]
#[diesel(table_name=vulnerability_instance_affected_file)]
pub struct CreateVulnerabilityInstanceAffectedFile {
/// Field representing column `id`
pub id: i32,
/// Field representing column `vulnerability_instance_id`
pub vulnerability_instance_id: i32,
/// Field representing column `file_path`
Expand Down