packages/common/prisma/schema.prisma (875 lines of code) (raw):

generator client { provider = "prisma-client-js" previewFeatures = ["views"] binaryTargets = ["native", "linux-arm64-openssl-3.0.x"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model aws_cloudformation_stacks { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_cloudformation_stacks_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? id String? arn String tags Json? creation_time DateTime? @db.Timestamp(6) stack_name String? stack_status String? capabilities String[] change_set_id String? deletion_time DateTime? @db.Timestamp(6) description String? disable_rollback Boolean? drift_information Json? enable_termination_protection Boolean? last_updated_time DateTime? @db.Timestamp(6) notification_arns String[] outputs Json? parameters Json? parent_id String? retain_except_on_create Boolean? role_arn String? rollback_configuration Json? root_id String? stack_id String? stack_status_reason String? timeout_in_minutes BigInt? deletion_mode String? detailed_status String? } model aws_ec2_images { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_ec2_images_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? arn String? tags Json? architecture String? block_device_mappings Json? boot_mode String? creation_date DateTime? @db.Timestamp(6) deprecation_time DateTime? @db.Timestamp(6) description String? ena_support Boolean? hypervisor String? image_id String? image_location String? image_owner_alias String? image_type String? imds_support String? kernel_id String? name String? owner_id String? platform String? platform_details String? product_codes Json? public Boolean? ramdisk_id String? root_device_name String? root_device_type String? source_instance_id String? sriov_net_support String? state String? state_reason Json? tpm_support String? usage_operation String? virtualization_type String? deregistration_protection String? last_launched_time String? } model aws_ec2_instances { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_ec2_instances_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? arn String state_transition_reason_time DateTime? @db.Timestamp(6) tags Json? ami_launch_index BigInt? architecture String? block_device_mappings Json? boot_mode String? capacity_reservation_id String? capacity_reservation_specification Json? client_token String? cpu_options Json? current_instance_boot_mode String? ebs_optimized Boolean? elastic_gpu_associations Json? elastic_inference_accelerator_associations Json? ena_support Boolean? enclave_options Json? hibernation_options Json? hypervisor String? iam_instance_profile Json? image_id String? instance_id String? instance_lifecycle String? instance_type String? ipv6_address String? kernel_id String? key_name String? launch_time DateTime? @db.Timestamp(6) licenses Json? maintenance_options Json? metadata_options Json? monitoring Json? network_interfaces Json? outpost_arn String? placement Json? platform String? platform_details String? private_dns_name String? private_dns_name_options Json? private_ip_address String? product_codes Json? public_dns_name String? public_ip_address String? ramdisk_id String? root_device_name String? root_device_type String? security_groups Json? source_dest_check Boolean? spot_instance_request_id String? sriov_net_support String? state Json? state_reason Json? state_transition_reason String? subnet_id String? tpm_support String? usage_operation String? usage_operation_update_time DateTime? @db.Timestamp(6) virtualization_type String? vpc_id String? @@ignore } model aws_organizations_account_parents { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_organizations_account_parents_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? id String? parent_id String? type String? @@ignore } model aws_organizations_accounts { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_organizations_accounts_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? tags Json? arn String? email String? id String? joined_method String? joined_timestamp DateTime? @db.Timestamp(6) name String? status String? @@ignore } model aws_organizations_organizational_units { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_organizations_organizational_units_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? arn String? id String? name String? @@ignore } model aws_organizations_organizational_unit_parents { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_organizations_organizational_unit_parents_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? id String? parent_id String? type String? @@ignore } model aws_organizations_roots { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_organizations_roots_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? tags Json? arn String? id String? name String? policy_types Json? @@ignore } model cloudbuster_fsbp_vulnerabilities { arn String aws_account_id String? aws_account_name String? aws_region String control_id String first_observed_at DateTime? @db.Timestamp(6) repo String? stack String? stage String? app String? severity String title String? within_sla Boolean remediation String? @@id([arn, control_id]) } model github_repositories { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String id BigInt node_id String? owner Json? name String? full_name String? description String? homepage String? code_of_conduct Json? default_branch String? master_branch String? created_at DateTime? @db.Timestamp(6) pushed_at DateTime? @db.Timestamp(6) updated_at DateTime? @db.Timestamp(6) html_url String? clone_url String? git_url String? mirror_url String? ssh_url String? svn_url String? language String? fork Boolean? forks_count BigInt? network_count BigInt? open_issues_count BigInt? open_issues BigInt? stargazers_count BigInt? subscribers_count BigInt? watchers_count BigInt? watchers BigInt? size BigInt? auto_init Boolean? parent Json? source Json? template_repository Json? organization Json? permissions Json? allow_rebase_merge Boolean? allow_update_branch Boolean? allow_squash_merge Boolean? allow_merge_commit Boolean? allow_auto_merge Boolean? allow_forking Boolean? delete_branch_on_merge Boolean? use_squash_pr_title_as_default Boolean? squash_merge_commit_title String? squash_merge_commit_message String? merge_commit_title String? merge_commit_message String? topics String[] archived Boolean? disabled Boolean? license Json? private Boolean? has_issues Boolean? has_wiki Boolean? has_pages Boolean? has_projects Boolean? has_downloads Boolean? has_discussions Boolean? is_template Boolean? license_template String? gitignore_template String? security_and_analysis Json? team_id BigInt? url String? archive_url String? assignees_url String? blobs_url String? branches_url String? collaborators_url String? comments_url String? commits_url String? compare_url String? contents_url String? contributors_url String? deployments_url String? downloads_url String? events_url String? forks_url String? git_commits_url String? git_refs_url String? git_tags_url String? hooks_url String? issue_comment_url String? issue_events_url String? issues_url String? keys_url String? labels_url String? languages_url String? merges_url String? milestones_url String? notifications_url String? pulls_url String? releases_url String? stargazers_url String? statuses_url String? subscribers_url String? subscription_url String? tags_url String? trees_url String? teams_url String? text_matches Json? visibility String? role_name String? custom_properties Json? web_commit_signoff_required Boolean? @@id([org, id], map: "github_repositories_cqpk") } model github_repository_branches { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String repository_id BigInt protection Json? name String commit Json? protected Boolean? @@id([org, repository_id, name], map: "github_repository_branches_cqpk") } model github_repository_custom_properties { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String property_name String repository_id BigInt value String? } model github_team_repositories { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String team_id BigInt id BigInt node_id String? owner Json? name String? full_name String? description String? homepage String? code_of_conduct Json? default_branch String? master_branch String? created_at DateTime? @db.Timestamp(6) pushed_at DateTime? @db.Timestamp(6) updated_at DateTime? @db.Timestamp(6) html_url String? clone_url String? git_url String? mirror_url String? ssh_url String? svn_url String? language String? fork Boolean? forks_count BigInt? network_count BigInt? open_issues_count BigInt? open_issues BigInt? stargazers_count BigInt? subscribers_count BigInt? watchers_count BigInt? watchers BigInt? size BigInt? auto_init Boolean? parent Json? source Json? template_repository Json? organization Json? permissions Json? allow_rebase_merge Boolean? allow_update_branch Boolean? allow_squash_merge Boolean? allow_merge_commit Boolean? allow_auto_merge Boolean? allow_forking Boolean? delete_branch_on_merge Boolean? use_squash_pr_title_as_default Boolean? squash_merge_commit_title String? squash_merge_commit_message String? merge_commit_title String? merge_commit_message String? topics String[] archived Boolean? disabled Boolean? license Json? private Boolean? has_issues Boolean? has_wiki Boolean? has_pages Boolean? has_projects Boolean? has_downloads Boolean? has_discussions Boolean? is_template Boolean? license_template String? gitignore_template String? security_and_analysis Json? url String? archive_url String? assignees_url String? blobs_url String? branches_url String? collaborators_url String? comments_url String? commits_url String? compare_url String? contents_url String? contributors_url String? deployments_url String? downloads_url String? events_url String? forks_url String? git_commits_url String? git_refs_url String? git_tags_url String? hooks_url String? issue_comment_url String? issue_events_url String? issues_url String? keys_url String? labels_url String? languages_url String? merges_url String? milestones_url String? notifications_url String? pulls_url String? releases_url String? stargazers_url String? statuses_url String? subscribers_url String? subscription_url String? tags_url String? trees_url String? teams_url String? text_matches Json? visibility String? role_name String? custom_properties Json? web_commit_signoff_required Boolean? @@id([org, team_id, id], map: "github_team_repositories_cqpk") } model github_teams { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String id BigInt node_id String? name String? description String? url String? slug String? permission String? permissions Json? privacy String? members_count BigInt? repos_count BigInt? organization Json? html_url String? members_url String? repositories_url String? parent Json? ldap_dn String? @@id([org, id], map: "github_teams_cqpk") } model github_workflows { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid org String repository_id BigInt contents String? id BigInt node_id String? name String? path String? state String? created_at DateTime? @db.Timestamp(6) updated_at DateTime? @db.Timestamp(6) url String? html_url String? badge_url String? contents_as_json Json? @@id([org, repository_id, id], map: "github_workflows_cqpk") } model galaxies_teams_table { cq_source_name String? @map("_cq_source_name") cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_id String @id(map: "galaxies_teams_table_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid team_id String? team_name String? team_description String? team_contact_email String? team_google_chat_space_key String? team_primary_github_team String? } model github_languages { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "github_languages_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid full_name String? name String? languages String[] } model aws_lambda_functions { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_lambda_functions_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? arn String? policy_revision_id String? policy_document Json? code_signing_config Json? code_repository_type String? update_runtime_on String? runtime_version_arn String? code Json? concurrency Json? configuration Json? tags Json? } model aws_s3_buckets { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_s3_buckets_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? arn String? creation_date DateTime? @db.Timestamp(6) name String? region String? policy_status Json? tags Json? } model audit_results { evaluated_on DateTime name String @id success Boolean cloudquery_total Int vendor_total Int } model cloudquery_table_frequency { table_name String @id frequency BigInt } model guardian_non_p_and_e_github_teams { team_name String @id } model guardian_production_status { status String @id priority Int } model repocop_github_repository_rules { full_name String @unique default_branch_name Boolean branch_protection Boolean team_based_access Boolean admin_access Boolean archiving Boolean? topics Boolean contents Boolean? vulnerability_tracking Boolean evaluated_on DateTime } model guardian_github_actions_usage { evaluated_on DateTime full_name String workflow_path String workflow_uses String[] @@unique([full_name, workflow_path], map: "guardian_github_actions_usage_full_name_key") } model repocop_vulnerabilities { source String full_name String open Boolean severity String package String urls String[] ecosystem String alert_issue_date DateTime is_patchable Boolean cves String[] repo_owner String id String @id @default(uuid()) within_sla Boolean } /// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. model aws_securityhub_findings { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_securityhub_findings_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? request_region String? aws_account_id String? created_at DateTime? @db.Timestamp(6) description String? generator_id String? id String? product_arn String? resources Json? schema_version String? title String? updated_at DateTime? @db.Timestamp(6) action Json? aws_account_name String? company_name String? compliance Json? confidence BigInt? criticality BigInt? finding_provider_fields Json? first_observed_at DateTime? @db.Timestamp(6) generator_details Json? last_observed_at DateTime? @db.Timestamp(6) malware Json? network Json? network_path Json? note Json? patch_summary Json? process Json? processed_at DateTime? @db.Timestamp(6) product_fields Json? product_name String? record_state String? region String? related_findings Json? remediation Json? sample Boolean? severity Json? source_url String? threat_intel_indicators Json? threats Json? types String[] user_defined_fields Json? verification_state String? vulnerabilities Json? workflow Json? workflow_state String? } model obligatron_results { id Int @id @default(autoincrement()) date DateTime @db.Timestamp(6) obligation_name String resource String reason String contacts Json url String? @@index([date]) @@index([obligation_name]) @@index([resource]) } model amigo_bake_packages { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @unique @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid base_name String base_ami_id String base_eol_date DateTime @db.Timestamp(6) recipe_id String bake_number Int source_ami_id String started_at DateTime @db.Timestamp(6) started_by String package_name String package_version String @@ignore } model cloudquery_plugin_usage { timestamp DateTime @db.Timestamp(6) name String metric String value Int @@unique([timestamp, name, metric], map: "cloudquery_plugin_usage_key") } model aws_ec2_route_tables { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_ec2_route_tables_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? arn String? tags Json? associations Json? owner_id String? propagating_vgws Json? route_table_id String? routes Json? vpc_id String? @@ignore } model aws_ec2_subnets { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_ec2_subnets_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid request_account_id String? request_region String? arn String? tags Json? assign_ipv6_address_on_creation Boolean? availability_zone String? availability_zone_id String? available_ip_address_count BigInt? cidr_block String? customer_owned_ipv4_pool String? default_for_az Boolean? enable_dns64 Boolean? enable_lni_at_device_index BigInt? ipv6_cidr_block_association_set Json? ipv6_native Boolean? map_customer_owned_ip_on_launch Boolean? map_public_ip_on_launch Boolean? outpost_arn String? owner_id String? private_dns_name_options_on_launch Json? state String? subnet_arn String? subnet_id String? vpc_id String? @@ignore } model aws_ec2_vpcs { cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6) cq_source_name String? @map("_cq_source_name") cq_id String @id(map: "aws_ec2_vpcs_cqpk") @map("_cq_id") @db.Uuid cq_parent_id String? @map("_cq_parent_id") @db.Uuid account_id String? region String? arn String? tags Json? cidr_block String? cidr_block_association_set Json? dhcp_options_id String? instance_tenancy String? ipv6_cidr_block_association_set Json? is_default Boolean? owner_id String? state String? vpc_id String? @@ignore } view view_repo_ownership { github_team_id BigInt github_team_name String github_team_slug String short_repo_name String full_repo_name String role_name String archived Boolean galaxies_team String? team_contact_email String? @@unique([github_team_name, full_repo_name]) } view aws_accounts { id String name String email String status String joined_timestamp DateTime @db.Timestamp(6) ancestors String[] is_product_and_engineering Boolean @@unique([id, name]) } view view_old_ec2_instances { account_id String account_name String instance_id String state String stack String stage String app String repo String region String creation_or_launch_time DateTime @db.Date @@ignore } view view_running_instances { account_name String? app String stack String stage String image_id String instance_id String built_by_amigo Boolean launch_time DateTime @db.Timestamp(6) type String @@ignore } /// The underlying view does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. view view_github_actions { evaluated_on DateTime? @db.Timestamp(6) full_name String? archived Boolean? workflow_path String? action String? action_name String? version String? @@ignore } /// The underlying view does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. view aws_organizations_tree { id String? type String? name String? ancestors String[] is_product_and_engineering Boolean? @@ignore } /// The underlying view does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. view view_aws_vpcs { account_id String? region String? vpc_id String? vpc_cidr_block String? is_default Boolean? subnet_id String? subnet_type String? subnet_cidr_block String? subnet_total_addresses BigInt? subnet_remaining_addresses BigInt? subnet_in_use Boolean? subnet_route_table_id String? @@ignore }