diff --git a/pattern/infra-assurance/models.ts b/pattern/infra-assurance/models.ts old mode 100755 new mode 100644 index d7ccf75d..b0d0aca0 --- a/pattern/infra-assurance/models.ts +++ b/pattern/infra-assurance/models.ts @@ -7,19 +7,12 @@ import * as udm from "../udm/mod.ts"; // deno-lint-ignore no-explicit-any type Any = any; -let syntheticUlidValue = 0; - -function syntheticUlid() { - syntheticUlidValue++; - return syntheticUlidValue.toString(); -} - const { gm, gts, tcf } = udm; -export const contractStatus = gm.autoIncPkTable( +export const contractStatus = gm.textPkTable( "contract_status", { - contract_status_id: udm.autoIncPK(), + contract_status_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -27,10 +20,10 @@ export const contractStatus = gm.autoIncPkTable( { isIdempotent: true }, ); -export const paymentType = gm.autoIncPkTable( +export const paymentType = gm.textPkTable( "payment_type", { - payment_type_id: udm.autoIncPK(), + payment_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -38,10 +31,10 @@ export const paymentType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const periodicity = gm.autoIncPkTable( +export const periodicity = gm.textPkTable( "periodicity", { - periodicity_id: udm.autoIncPK(), + periodicity_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -49,10 +42,10 @@ export const periodicity = gm.autoIncPkTable( { isIdempotent: true }, ); -export const boundaryNature = gm.autoIncPkTable( +export const boundaryNature = gm.textPkTable( "boundary_nature", { - boundary_nature_id: udm.autoIncPK(), + boundary_nature_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -60,10 +53,10 @@ export const boundaryNature = gm.autoIncPkTable( { isIdempotent: true }, ); -export const timeEntryCategory = gm.autoIncPkTable( +export const timeEntryCategory = gm.textPkTable( "time_entry_category", { - time_entry_category_id: udm.autoIncPK(), + time_entry_category_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -71,10 +64,10 @@ export const timeEntryCategory = gm.autoIncPkTable( { isIdempotent: true }, ); -export const raciMatrixSubject = gm.autoIncPkTable( +export const raciMatrixSubject = gm.textPkTable( "raci_matrix_subject", { - raci_matrix_subject_id: udm.autoIncPK(), + raci_matrix_subject_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -88,10 +81,10 @@ export const raciMatrixAssignmentNature = gm.textEnumTable( { isIdempotent: true }, ); -export const skillNature = gm.autoIncPkTable( +export const skillNature = gm.textPkTable( "skill_nature", { - skill_nature_id: udm.autoIncPK(), + skill_nature_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -99,10 +92,10 @@ export const skillNature = gm.autoIncPkTable( { isIdempotent: true }, ); -export const skill = gm.autoIncPkTable( +export const skill = gm.textPkTable( "skill", { - skill_id: udm.autoIncPK(), + skill_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -122,10 +115,40 @@ export const vulnerabilityStatus = gm.textEnumTable( { isIdempotent: true }, ); -export const assetStatus = gm.autoIncPkTable( +export const assetStatus = gm.textPkTable( "asset_status", { - asset_status_id: udm.autoIncPK(), + asset_status_id: udm.ulidPrimaryKey(), + code: tcf.unique(udm.text()), + value: udm.text(), + ...gm.housekeeping.columns, + }, + { isIdempotent: true }, +); + +/** + * Reference URL: https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/application_server.html + */ +/** + * https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/directory_server.html + */ +/** + * https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/mail_server.html + */ +/** + * https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/lb_software.html + */ +/** + * https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/web_server.html + */ +/** + * https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/database.html + */ + +export const assetServiceType = gm.textPkTable( + "asset_service_type", + { + asset_service_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -133,10 +156,10 @@ export const assetStatus = gm.autoIncPkTable( { isIdempotent: true }, ); -export const assetServiceStatus = gm.autoIncPkTable( +export const assetServiceStatus = gm.textPkTable( "asset_service_status", { - asset_service_status_id: udm.autoIncPK(), + asset_service_status_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -144,10 +167,10 @@ export const assetServiceStatus = gm.autoIncPkTable( { isIdempotent: true }, ); -export const assetType = gm.autoIncPkTable( +export const assetType = gm.textPkTable( "asset_type", { - asset_type_id: udm.autoIncPK(), + asset_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -155,10 +178,10 @@ export const assetType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const assignment = gm.autoIncPkTable( +export const assignment = gm.textPkTable( "assignment", { - assignment_id: udm.autoIncPK(), + assignment_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -172,10 +195,10 @@ export const probability = gm.textEnumTable( { isIdempotent: true }, ); -export const threatSourceType = gm.autoIncPkTable( +export const threatSourceType = gm.textPkTable( "threat_source_type", { - threat_source_type_id: udm.autoIncPK(), + threat_source_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -183,10 +206,10 @@ export const threatSourceType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const threatEventType = gm.autoIncPkTable( +export const threatEventType = gm.textPkTable( "threat_event_type", { - threat_event_type_id: udm.autoIncPK(), + threat_event_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -194,10 +217,10 @@ export const threatEventType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const calendarPeriod = gm.autoIncPkTable( +export const calendarPeriod = gm.textPkTable( "calendar_period", { - calendar_period_id: udm.autoIncPK(), + calendar_period_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -223,10 +246,10 @@ export const kpiStatus = gm.textEnumTable( { isIdempotent: true }, ); -export const trackingPeriod = gm.autoIncPkTable( +export const trackingPeriod = gm.textPkTable( "tracking_period", { - tracking_period_id: udm.autoIncPK(), + tracking_period_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -246,10 +269,10 @@ export const auditorType = gm.textEnumTable( { isIdempotent: true }, ); -export const auditPurpose = gm.autoIncPkTable( +export const auditPurpose = gm.textPkTable( "audit_purpose", { - audit_purpose_id: udm.autoIncPK(), + audit_purpose_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -257,10 +280,10 @@ export const auditPurpose = gm.autoIncPkTable( { isIdempotent: true }, ); -export const auditorStatusType = gm.autoIncPkTable( +export const auditorStatusType = gm.textPkTable( "audit_status", { - audit_status_id: udm.autoIncPK(), + audit_status_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -268,10 +291,10 @@ export const auditorStatusType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const trainingSubject = gm.autoIncPkTable( +export const trainingSubject = gm.textPkTable( "training_subject", { - training_subject_id: udm.autoIncPK(), + training_subject_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -279,10 +302,10 @@ export const trainingSubject = gm.autoIncPkTable( { isIdempotent: true }, ); -export const statusValues = gm.autoIncPkTable( +export const statusValues = gm.textPkTable( "status_value", { - status_value_id: udm.autoIncPK(), + status_value_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -290,10 +313,10 @@ export const statusValues = gm.autoIncPkTable( { isIdempotent: true }, ); -export const ratingValue = gm.autoIncPkTable( +export const ratingValue = gm.textPkTable( "rating_value", { - rating_value_id: udm.autoIncPK(), + rating_value_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -301,10 +324,10 @@ export const ratingValue = gm.autoIncPkTable( { isIdempotent: true }, ); -export const contractType = gm.autoIncPkTable( +export const contractType = gm.textPkTable( "contract_type", { - contract_type_id: udm.autoIncPK(), + contract_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -312,10 +335,10 @@ export const contractType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const graphNature = gm.autoIncPkTable( +export const graphNature = gm.textPkTable( "graph_nature", { - graph_nature_id: udm.autoIncPK(), + graph_nature_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -329,10 +352,10 @@ export const severity = gm.textEnumTable( { isIdempotent: true }, ); -export const assetRiskType = gm.autoIncPkTable( +export const assetRiskType = gm.textPkTable( "asset_risk_type", { - asset_risk_type_id: udm.autoIncPK(), + asset_risk_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -346,10 +369,10 @@ export const priority = gm.textEnumTable( { isIdempotent: true }, ); -export const riskSubject = gm.autoIncPkTable( +export const riskSubject = gm.textPkTable( "risk_subject", { - risk_subject_id: udm.autoIncPK(), + risk_subject_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -357,10 +380,10 @@ export const riskSubject = gm.autoIncPkTable( { isIdempotent: true }, ); -export const riskType = gm.autoIncPkTable( +export const riskType = gm.textPkTable( "risk_type", { - risk_type_id: udm.autoIncPK(), + risk_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -368,10 +391,10 @@ export const riskType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const incidentCategory = gm.autoIncPkTable( +export const incidentCategory = gm.textPkTable( "incident_category", { - incident_category_id: udm.autoIncPK(), + incident_category_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -379,10 +402,10 @@ export const incidentCategory = gm.autoIncPkTable( { isIdempotent: true }, ); -export const incidentSubCategory = gm.autoIncPkTable( +export const incidentSubCategory = gm.textPkTable( "incident_sub_category", { - incident_sub_category_id: udm.autoIncPK(), + incident_sub_category_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -390,10 +413,10 @@ export const incidentSubCategory = gm.autoIncPkTable( { isIdempotent: true }, ); -export const incidentType = gm.autoIncPkTable( +export const incidentType = gm.textPkTable( "incident_type", { - incident_type_id: udm.autoIncPK(), + incident_type_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -401,10 +424,10 @@ export const incidentType = gm.autoIncPkTable( { isIdempotent: true }, ); -export const incidentStatus = gm.autoIncPkTable( +export const incidentStatus = gm.textPkTable( "incident_status", { - incident_status_id: udm.autoIncPK(), + incident_status_id: udm.ulidPrimaryKey(), code: tcf.unique(udm.text()), value: udm.text(), ...gm.housekeeping.columns, @@ -545,6 +568,7 @@ export const assetService = gm.textPkTable("asset_service", { asset_service_id: udm.ulidPrimaryKey(), asset_id: asset.references .asset_id(), + asset_service_type_id: assetServiceType.references.asset_service_type_id(), name: udm.text(), description: udm.text(), asset_service_status_id: assetServiceStatus.references @@ -1076,6 +1100,7 @@ export const allContentTables: SQLa.TableDefinition< hostBoundary, assetStatus, assetServiceStatus, + assetServiceType, assetType, assignment, raciMatrix, @@ -1134,652 +1159,6 @@ export const allContentTables: SQLa.TableDefinition< auditorStatusType, ]; -const partyRoleInsertion = udm.partyRole - .insertDML([{ - party_role_id: syntheticUlid(), - code: "VENDOR", - value: "Vendor", - }, { - party_role_id: syntheticUlid(), - code: "CUSTOMER", - value: "Customer", - }]); - -const partyIdentifierTypeInsertion = udm - .partyIdentifierType.insertDML([{ - party_identifier_type_id: syntheticUlid(), - code: "PASSPORT", - value: "Passport", - }, { - party_identifier_type_id: syntheticUlid(), - code: "UUID", - value: "UUID", - }, { - party_identifier_type_id: syntheticUlid(), - code: "DRIVING_LICENSE", - value: "Driving License", - }]); - -const personTypeInsertion = udm - .personType.insertDML([{ - person_type_id: syntheticUlid(), - code: "INDIVIDUAL", - value: "Individual", - }, { - person_type_id: syntheticUlid(), - code: "PROFESSIONAL", - value: "Professional", - }]); - -const contactTypeInsertion = udm - .contactType.insertDML([{ - contact_type_id: syntheticUlid(), - code: "HOME_ADDRESS", - value: "Home Address", - }, { - contact_type_id: syntheticUlid(), - code: "OFFICIAL_ADDRESS", - value: "Official Address", - }, { - contact_type_id: syntheticUlid(), - code: "MOBILE_PHONE_NUMBER", - value: "Mobile Phone Number", - }, { - contact_type_id: syntheticUlid(), - code: "LAND_PHONE_NUMBER", - value: "Land Phone Number", - }, { - contact_type_id: syntheticUlid(), - code: "OFFICIAL_EMAIL", - value: "Official Email", - }, { - contact_type_id: syntheticUlid(), - code: "PERSONAL_EMAIL", - value: "Personal Email", - }]); - -const organizationRoleTypeInsertion = udm - .organizationRoleType.insertDML([{ - organization_role_type_id: syntheticUlid(), - code: "PROJECT_MANAGER_TECHNOLOGY", - value: "Project Manager Technology", - }, { - organization_role_type_id: syntheticUlid(), - code: "PROJECT_MANAGER_QUALITY", - value: "Project Manager Quality", - }, { - organization_role_type_id: syntheticUlid(), - code: "PROJECT_MANAGER_DEVOPS", - value: "Project Manager DevOps", - }, { - organization_role_type_id: syntheticUlid(), - code: "ASSOCIATE_MANAGER_TECHNOLOGY", - value: "Associated Manager Technology", - }, { - organization_role_type_id: syntheticUlid(), - code: "ASSOCIATE_MANAGER_QUALITY", - value: "Associate Manager Quality", - }, { - organization_role_type_id: syntheticUlid(), - code: "ASSOCIATE_MANAGER_DEVOPS", - value: "Associate Manager DevOps", - }, { - organization_role_type_id: syntheticUlid(), - code: "SENIOR_LEAD_SOFTWARE_ENGINEER_ARCHITECT", - value: "Senior Lead Software Engineer Architect", - }, { - organization_role_type_id: syntheticUlid(), - code: "LEAD_SOFTWARE_ENGINEER_ARCHITECT", - value: "Lead Software Engineer Architect", - }, { - organization_role_type_id: syntheticUlid(), - code: "SENIOR_LEAD_SOFTWARE_QUALITY_ENGINEER", - value: "Senior Lead Software DevOps Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "LEAD_SOFTWARE_ENGINEER", - value: "Lead Software Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "LEAD_SOFTWARE_QUALITY_ENGINEER", - value: "Lead Software Quality Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "LEAD_SOFTWARE_DEVOPS_ENGINEER", - value: "Lead Software DevOps Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "LEAD_SYSTEM_NETWORK_ENGINEER", - value: "Lead System Network Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "SENIOR_SOFTWARE_ENGINEER", - value: "Senior Software Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "SENIOR_SOFTWARE_QUALITY_ENGINEER", - value: "Senior Software Quality Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "SOFTWARE_QUALITY_ENGINEER", - value: "Software Quality Engineer", - }, { - organization_role_type_id: syntheticUlid(), - code: "SECURITY_ENGINEER", - value: "Security Engineer", - }]); - -const contractStatusInsertion = contractStatus.insertDML([ - { code: "ACTIVE", value: "Active" }, - { code: "AWAITING_APPROVAL", value: "Awaiting Approval" }, - { - code: "AWAITING_APPROVAL_FOR_RENEWAL", - value: "Awaiting Approval For Renewal", - }, - { code: "CANCELED", value: "Canceled" }, - { code: "DENIED", value: "Denied" }, - { code: "FINISHED", value: "Finished" }, - { code: "IN_PREPARATION", value: "In Preparation" }, - { code: "QUOTE_REQUESTED", value: "Quote Requested" }, - { code: "QUOTED", value: "Quoted" }, - { code: "STANDARD_CONTRACT", value: "Standard Contract" }, - { code: "SUSPENDED", value: "Suspended" }, - { code: "VALIDATED", value: "Validated" }, -]); - -const periodicityInsertion = periodicity.insertDML([ - { code: "ANNUAL", value: "Annual" }, - { code: "BI_MONTHLY", value: "Bi Monthly" }, - { code: "BI_WEEKLY", value: "Bi Weekly" }, - { code: "DAILY", value: "Daily" }, - { code: "MONTHLY", value: "Monthly" }, - { code: "OTHER", value: "Other" }, - { code: "QUARTERLY", value: "Quarterly" }, - { code: "SEMI_ANNUAL", value: "Semi Annual" }, - { code: "SEMI_MONTHLY", value: "Semi Monthly" }, - { code: "WEEKLY", value: "Weekly" }, -]); - -const paymentTypeInsertion = paymentType.insertDML([ - { code: "BOTH", value: "Both" }, - { code: "LOANS", value: "Loans" }, - { code: "NONE", value: "None" }, - { code: "RENTS", value: "Rents" }, -]); - -const boundaryNatureInsertion = boundaryNature.insertDML([ - { code: "REGULATORY_TAX_ID", value: "Regulatory Tax ID" }, -]); - -const timeEntryCategoryInsertion = timeEntryCategory.insertDML([ - { code: "MISC_MEETINGS", value: "Misc Meetings" }, - { code: "MISC_OTHER", value: "Misc Other" }, - { code: "MISC_VACATION", value: "Misc Vacation" }, - { code: "MISC_WORK_ITEM", value: "Misc Work Item" }, - { code: "PACKAGE", value: "Package" }, - { code: "PROJECT", value: "Project" }, - { code: "REQUEST", value: "Request" }, - { code: "TASK", value: "Task" }, -]); - -const raciMatrixSubjectInsertion = raciMatrixSubject.insertDML([ - { code: "PROJECT_LEADERSHIP", value: "Project Leadership" }, - { code: "PROJECT_MANAGEMENT", value: "Project Management" }, - { code: "APPLICATION_DEVELOPMENT", value: "Application Development" }, - { code: "DEV_OPERATIONS", value: "Dev Operations" }, - { code: "QUALITY_ASSURANCE", value: "Quality Assurance" }, - { code: "SEARCH_ENGINE_OPTIMIZATION", value: "Search Engine Optimization" }, - { code: "USER_INTERFASE_USABILITY", value: "User Interfase And Usability" }, - { code: "BUSINESS_ANALYST", value: "Business Analyst (Abm)" }, - { code: "CURATION_COORDINATION", value: "Curation Coordination" }, - { code: "KNOWLEDGE_REPRESENTATION", value: "Knowledge Representation" }, - { code: "MARKETING_OUTREACH", value: "Marketing Outreach" }, - { code: "CURATION_WORKS", value: "Curation Works" }, -]); - -const skillNatureInsertion = skillNature.insertDML([ - { code: "SOFTWARE", value: "Software" }, - { code: "HARDWARE", value: "Hardware" }, -]); - -const skillInsertion = skill.insertDML([ - { code: "ANGULAR", value: "Angular" }, - { code: "DENO", value: "Deno" }, - { code: "TYPESCRIPT", value: "Typescript" }, - { code: "POSTGRESQL", value: "PostgreSQL" }, - { code: "MYSQL", value: "MySQL" }, - { code: "HUGO", value: "Hugo" }, - { code: "PHP", value: "PHP" }, - { code: "JAVASCRIPT", value: "JavaScript" }, - { code: "PYTHON", value: "Python" }, - { code: "DOT_NET", value: ".NET" }, - { code: "ORACLE", value: "Oracle" }, - { code: "JAVA", value: "Java" }, - { code: "JQUERY", value: "jQuery" }, - { code: "OSQUERY", value: "Osquery" }, - { code: "REACTJS", value: "ReactJs" }, -]); - -const assetStatusInsertion = assetStatus.insertDML([ - { code: "AWAITING_RECEIPT", value: "Awaiting Receipt" }, - { code: "IN_STOCK", value: "In Stock" }, - { code: "IN_USE", value: "In Use" }, - { code: "MISSING", value: "Missing" }, - { code: "RETIRED", value: "Retired" }, - { code: "RETURNED_FOR_MAINTENANCE", value: "Returned For Maintenance" }, - { code: "RETURNED_TO_SUPPLIER", value: "Returned To Supplier" }, - { code: "UNDEFINED", value: "Undefined" }, -]); - -const assetServiceStatusInsertion = assetServiceStatus.insertDML([ - { code: "ACTIVE", value: "Active" }, - { code: "INACTIVE", value: "Inactive" }, - { code: "DELETED", value: "DELETED" }, -]); - -const assetTypeInsertion = assetType.insertDML([ - { code: "ACCOUNT", value: "Account" }, - { code: "BUSINESS_SERVICE", value: "Business Service" }, - { code: "CABLE", value: "Cable" }, - { code: "CABLE_DEVICE", value: "Cable Device" }, - { code: "COLLECTIVE_EQUIPMENT", value: "Collective Equipment" }, - { code: "COMPUTER", value: "Computer" }, - { code: "CPU", value: "Cpu" }, - { code: "DOMAIN", value: "Domain" }, - { code: "SERVER", value: "Server" }, - { code: "EXTENSION_CARD", value: "Extension Card" }, - { code: "GLOBAL_SOFTWARE_LICENSE", value: "Global Software License" }, - { code: "LAPTOP", value: "Laptop" }, - { code: "LASER_PRINTER", value: "Laser Printer" }, - { code: "LICENSE_CONTRACT", value: "License Contract" }, - { code: "MAINTENANCE_CONTRACT", value: "Maintenance Contract" }, - { code: "MASS_STORAGE", value: "Mass Storage" }, - { code: "MOBILE_DEVICE", value: "Mobile Device" }, - { code: "MONITOR", value: "Monitor" }, - { code: "NETWORK_HARDWARE", value: "Network Hardware" }, - { code: "NETWORK_INTERFACE", value: "Network Interface" }, - { code: "OEM_SOFTWARE_LICENSE", value: "Oem Software License" }, - { code: "PRINTER", value: "Printer" }, - { code: "RACKMOUNT_MONITOR", value: "Rackmount Monitor" }, - { code: "SCANNER", value: "Scanner" }, - { - code: "SOFTWARE_ACCESS_AUTHORIZATION", - value: "Software Access Authorization", - }, - { code: "SOFTWARE_ACCESS_REMOVAL", value: "Software Access Removal" }, - { code: "SOFTWARE_ADD_WORK_ORDER", value: "Software Add Work Order" }, - { code: "SOFTWARE_INSTALLATION", value: "Software Installation" }, - { code: "SOFTWARE_LICENSE", value: "Software License" }, - { code: "SOFTWARE_REMOVAL_WORK_ORDER", value: "Software Removal Work Order" }, - { code: "STANDARD_ASSET", value: "Standard Asset" }, - { code: "TELECOMMUNICATION_EQUIPMENT", value: "Telecommunication Equipment" }, - { code: "TELEPHONE", value: "Telephone" }, - { code: "VIRTUAL_MACHINE", value: "Virtual Machine" }, - { code: "SECURITY_POLICY", value: "Security Policy" }, - { code: "EMPLOYEE_DATA", value: "Employee Data" }, - { code: "API", value: "Api" }, - { code: "FIREWALL", value: "Firewall" }, -]); - -const assignmentInsertion = assignment.insertDML([ - { code: "AWAITING_RECEIPT", value: "Awaiting receipt" }, - { code: "IN_STOCK", value: "In Stock" }, - { code: "IN_USE", value: "In Use" }, - { code: "MISSING", value: "Missing" }, - { code: "RETURNED_FOR_MAINTENANCE", value: "Returned For Maintenance" }, - { code: "RETURNED_TO_SUPPLIER", value: "Returned To Supplier" }, - { code: "RETIRED", value: "Retired" }, -]); - -const threatSourceTypeInsertion = threatSourceType.insertDML([ - { code: "PHISHING", value: "Phishing" }, - { code: "SPAM", value: "Spam" }, - { - code: "SPYWARE_AND_MALWARE_FOR_EXTORTION", - value: "Spyware and malware for extortion", - }, - { - code: "THEFT_OF_PRIVATE_INFORMATION", - value: "Theft of private information", - }, - { code: "ONLINE_SCAMS", value: "Online scams" }, - { - code: "DESTROY_OR_ABUSE_CRITICAL_INFRASTRUCTURE", - value: "Destroy or abuse critical infrastructure", - }, - { code: "THREATEN_NATIONAL_SECURITY", value: "Threaten national security" }, - { code: "DISRUPT_ECONOMIES", value: "Disrupt economies" }, - { - code: "CAUSE_BODILY_HARM_TO_CITIZENS", - value: "Cause bodily harm to citizens", - }, - { code: "DENIAL_OF_SERVICE_ATTACKS", value: "Denial-of-Service Attacks" }, - { code: "DOXING", value: "Doxing" }, - { code: "LEAKING_INFORMATION", value: "Leaking Information" }, - { - code: "THE_USE_OF_THE_SOFTWARE_RECAP", - value: "The Use of the Software RECAP", - }, - { code: "BLOGGING_ANONYMOUSLY", value: "Blogging Anonymously" }, - { code: "GEO_BOMBING", value: "Geo-bombing" }, - { code: "WEBSITE_MIRRORING", value: "Website Mirroring" }, - { - code: "CHANGING_THE_CODE_FOR_WEBSITES_OR_WEBSITE_DEFACEMENTS", - value: "Changing the Code for Websites or website defacements", - }, -]); - -const threatEventTypeInsertion = threatEventType.insertDML([ - { code: "VIRUSES", value: "Viruses" }, - { code: "WORMS", value: "Worms" }, - { code: "TROJANS", value: "Trojans" }, - { code: "RANSOMWARE", value: "Ransomware" }, - { code: "CRYPTOJACKING", value: "Cryptojacking" }, - { code: "SPYWARE", value: "Spyware" }, - { code: "ADWARE", value: "Adware" }, - { code: "FILELESS_MALWARE", value: "Fileless malware" }, - { code: "ROOTKITS", value: "Rootkits" }, - { code: "BAITING", value: "Baiting" }, - { code: "PRETEXTING", value: "Pretexting" }, - { code: "PHISHING", value: "Phishing" }, - { code: "VISHING", value: "Vishing" }, - { code: "SMISHING", value: "Smishing" }, - { code: "PIGGYBACKING", value: "Piggybacking" }, - { code: "TAILGATING", value: "Tailgating" }, - { code: "EMAIL_HIJACKING", value: "Email Hijacking" }, - { code: "DNS_SPOOFING", value: "DNS spoofing" }, - { code: "IP_SPOOFING", value: "IP spoofing" }, - { code: "HTTPS_SPOOFING", value: "HTTPS spoofing" }, - { code: "HTTP_FLOOD_DDOS", value: "HTTP flood DDoS" }, - { code: "SYN_FLOOD_DDOS", value: "SYN flood DDoS" }, - { code: "UDP_FLOOD_DDOS", value: "UDP flood DDoS" }, - { code: "ICMP_FLOOD", value: "ICMP flood" }, - { code: "NTP_AMPLIFICATION", value: "NTP amplification" }, - { code: "SQL_INJECTION", value: "SQL injection" }, - { code: "CODE_INJECTION", value: "Code injection" }, - { code: "OS_COMMAND_INJECTION", value: "OS Command Injection" }, - { code: "LDAP_INJECTION", value: "LDAP injection" }, - { - code: "XML_EXTERNAL_ENTITIES_INJECTION", - value: "XML eXternal Entities (XXE) Injection", - }, - { code: "CROSS_SITE_SCRIPTING", value: "Cross Site Scripting (XSS)" }, - { code: "BROKEN_ACCESS_CONTROL", value: "Broken Access Control" }, - { code: "CRYPTOGRAPHIC_FAILURES", value: "Cryptographic Failures" }, - { code: "INSECURE_DESIGN", value: "Insecure Design" }, - { code: "SECURITY_MISCONFIGURATION", value: "Security Misconfiguration" }, - { - code: "VULNERABLE_AND_OUTDATED_COMPONENTS", - value: "Vulnerable and Outdated Components", - }, - { - code: "IDENTIFICATION_AND_AUTHENTICATION_FAILURES", - value: "Identification and Authentication Failures", - }, - { - code: "SOFTWARE_AND_DATA_INTEGRITY_FAILURES", - value: "Software and Data Integrity Failures", - }, - { - code: "SECURITY_LOGGING_AND_MONITORING_FAILURES", - value: "Security Logging and Monitoring Failures", - }, - { code: "SERVER_SIDE_REQUEST_FORGERY", value: "Server Side Request Forgery" }, -]); - -const calendarPeriodInsertion = calendarPeriod.insertDML([ - { code: "TWENTY_FOUR_HOURS_SEVEN_DAYS", value: "24x7" }, - { code: "BUSINESS_HOURS", value: "Business hours" }, - { code: "NON_BUSINESS_HOURS", value: "Non-business hours" }, -]); - -const trackingPeriodInsertion = trackingPeriod.insertDML([ - { code: "DAY", value: "Day" }, - { code: "HOUR", value: "Hour" }, - { code: "MONTH", value: "Month" }, - { code: "OTHER", value: "Other" }, - { code: "QUARTER", value: "Quarter" }, - { code: "WEEK", value: "Week" }, - { code: "YEAR", value: "Year" }, -]); - -const auditPurposeInsertion = auditPurpose.insertDML([ - { code: "MEANING_DRY_RUN", value: "exmeaning dry runternal" }, - { code: "OFFICIAL", value: "official" }, -]); - -const auditorStatusTypeInsertion = auditorStatusType.insertDML([ - { code: "OUTSTANDING", value: "Outstanding" }, - { code: "FULFILLED", value: "Fulfilled" }, - { code: "REJECTED", value: "Rejected" }, - { code: "ACCEPTED", value: "Accepted" }, -]); - -const trainingSubjectInsertion = trainingSubject.insertDML([ - { code: "HIPAA", value: "HIPAA" }, - { code: "CYBER_SECURITY", value: "Cyber Security" }, - { - code: "OBSERVABILITY_OPEN_TELEMETRY", - value: "Observability Open Telemetry", - }, - { code: "BEST_PRACTICES_OF_AGILE", value: "Practices of Agile Workflow" }, -]); - -const statusValuesInsertion = statusValues.insertDML([ - { code: "YES", value: "Yes" }, - { code: "NO", value: "No" }, -]); - -const ratingValueInsertion = ratingValue.insertDML([ - { code: "ONE", value: "1" }, - { code: "TWO", value: "2" }, - { code: "THREE", value: "3" }, - { code: "FOUR", value: "4" }, - { code: "FIVE", value: "5" }, -]); - -const contractTypeInsertion = contractType.insertDML([ - { - code: "GENERAL_CONTRACT_FOR_SERVICES", - value: "General Contract for Services", - }, - { code: "EMPLOYMENT_AGREEMENT", value: "Employment Agreement" }, - { code: "NONCOMPETE_AGREEMENT", value: "Noncompete Agreement" }, - { code: "VENDOR_SLA", value: "Vendor SLA" }, - { code: "VENDOR_NDA", value: "Vendor NDA" }, -]); - -const graphNatureInsertion = graphNature.insertDML([ - { code: "SERVICE", value: "Service" }, - { code: "APP", value: "Application" }, -]); - -const assetRiskTypeInsertion = assetRiskType.insertDML([ - { code: "SECURITY", value: "Security" }, -]); - -const riskSubjectInsertion = riskSubject.insertDML([ - { code: "TECHNICAL_RISK", value: "Technical Risk" }, -]); - -const riskTypeInsertion = riskType.insertDML([ - { code: "BUDGET", value: "Budget" }, - { code: "QUALITY", value: "Quality" }, - { code: "SCHEDULE", value: "Schedule" }, - { code: "SCHEDULE_AND_BUDGET", value: "Schedule And Budget" }, -]); - -const incidentCategoryInsertion = incidentCategory.insertDML([ - { code: "ACCESS", value: "Access" }, - { code: "DATA", value: "Data" }, - { code: "FACILITIES", value: "Facilities" }, - { code: "FAILURE", value: "Failure" }, - { code: "GENERAL_INFORMATION", value: "General Information" }, - { code: "HARDWARE", value: "Hardware" }, - { code: "HOW_TO", value: "How To" }, - { code: "OTHER", value: "Other" }, - { code: "PERFORMANCE", value: "Performance" }, - { code: "SECURITY", value: "Security" }, - { code: "SERVICE_DELIVERY", value: "Service Delivery" }, - { code: "SERVICE_PORTFOLIO", value: "Service Portfolio" }, - { code: "STATUS", value: "Status" }, - { code: "SUPPORT", value: "Support" }, - { code: "THRIFTY", value: "Thrifty" }, -]); - -const incidentSubCategoryInsertion = incidentSubCategory.insertDML([ - { code: "AUTHORIZATION_ERROR", value: "Authorization Error" }, - { code: "AVAILABILITY", value: "Availability" }, - { code: "DATA_OR_FILE_CORRUPTED", value: "Data Or File Corrupted" }, - { code: "DATA_OR_FILE_INCORRECT", value: "Data Or File Incorrect" }, - { code: "DATA_OR_FILE_MISSING", value: "Data Or File Missing" }, - { code: "ERROR_MESSAGE", value: "Error Message" }, - { - code: "FUNCTION_OR_FEATURE_NOT_WORKING", - value: "Function Or Feature Not Working", - }, - { code: "FUNCTIONALITY", value: "Functionality" }, - { code: "GENERAL_INFORMATION", value: "General Information" }, - { code: "HARDWARE_FAILURE", value: "Hardware Failure" }, - { code: "HOW_TO", value: "How To" }, - { code: "INCIDENT_RESOLUTION_QUALITY", value: "Incident Resolution Quality" }, - { code: "INCIDENT_RESOLUTION_TIME", value: "Incident Resolution Time" }, - { code: "JOB_FAILED", value: "Job Failed" }, - { code: "LOGIN_FAILURE", value: "Login Failure" }, - { code: "MISSING_OR_STOLEN", value: "Missing Or Stolen" }, - { code: "NEW_SERVICE", value: "New Service" }, - { code: "PERFORMANCE", value: "Performance" }, - { code: "PERFORMANCE_DEGRADATION", value: "Performance Degradation" }, - { code: "PERSON", value: "Person" }, - { code: "SECURITY_BREACH", value: "Security Breach" }, - { code: "SECURITY_EVENT", value: "Security Event/Message" }, - { code: "STATUS", value: "Status" }, - { code: "STORAGE_LIMIT_EXCEEDED", value: "Storage Limit Exceeded" }, - { code: "SYSTEM_DOWN", value: "System Down" }, - { code: "SYSTEM_OR_APPLICATION_HANGS", value: "System Or Application Hangs" }, - { code: "UPGRADE_NEW_RELEASE", value: "Upgrade/New Release" }, - { code: "VIRUS_ALERT", value: "Virus Alert" }, -]); - -const incidentTypeInsertion = incidentType.insertDML([ - { code: "COMPLAINT", value: "Complaint" }, - { code: "INCIDENT", value: "Incident" }, - { code: "REQUEST_FOR_INFORMATION", value: "Request For Information" }, -]); - -const incidentStatusInsertion = incidentStatus.insertDML([ - { code: "ACCEPTED", value: "Accepted" }, - { code: "ASSIGNED", value: "Assigned" }, - { code: "CANCELLED", value: "Cancelled" }, - { code: "CATEGORIZE", value: "Categorize" }, - { code: "CLOSED", value: "Closed" }, - { code: "OPEN", value: "Open" }, - { code: "PENDING_CHANGE", value: "Pending Change" }, - { code: "PENDING_CUSTOMER", value: "Pending Customer" }, - { code: "PENDING_EVIDENCE", value: "Pending Evidence" }, - { code: "PENDING_OTHER", value: "Pending Other" }, - { code: "PENDING_VENDOR", value: "Pending Vendor" }, - { code: "REFERRED", value: "Referred" }, - { code: "REJECTED", value: "Rejected" }, - { code: "REOPENED", value: "Reopened" }, - { code: "REPLACED_PROBLEM", value: "Replaced Problem" }, - { code: "RESOLVED", value: "Resolved" }, - { code: "SUSPENDED", value: "Suspended" }, - { code: "WORK_IN_PROGRESS", value: "Work In Progress" }, -]); - -const partyTypeInsertion = udm - .partyType.insertDML([{ - party_type_id: syntheticUlid(), - code: "PERSON", - value: "Person", - }, { - party_type_id: syntheticUlid(), - code: "ORGANIZATION", - value: "Organization", - }]); - -const sexTypeInsertion = udm - .sexType.insertDML([{ - sex_type_id: syntheticUlid(), - code: "MALE", - value: "Male", - }, { - sex_type_id: syntheticUlid(), - code: "FEMALE", - value: "Female", - }, { - sex_type_id: syntheticUlid(), - code: "INTERSEX", - value: "Intersex", - }, { - sex_type_id: syntheticUlid(), - code: "X", - value: "X", - }, { - sex_type_id: syntheticUlid(), - code: "NOT_LISTED_PLEASE_DESCRIBE", - value: "Not listed, please describe", - }, { - sex_type_id: syntheticUlid(), - code: "UNKNOWN", - value: "Unknown", - }]); - -const genderTypeInsertion = udm - .genderType.insertDML([{ - gender_type_id: syntheticUlid(), - code: "MALE", - value: "Male", - }, { - gender_type_id: syntheticUlid(), - code: "FEMALE", - value: "Female", - }, { - gender_type_id: syntheticUlid(), - code: "OTHER", - value: "Other", - }, { - gender_type_id: syntheticUlid(), - code: "NONBINARY", - value: "Nonbinary", - }, { - gender_type_id: syntheticUlid(), - code: "AGENDER", - value: "Agender", - }, { - gender_type_id: syntheticUlid(), - code: "TRANGENDER", - value: "Transgender", - }, { - gender_type_id: syntheticUlid(), - code: "CISGENDER", - value: "Cisgender", - }, { - gender_type_id: syntheticUlid(), - code: "GENDERQUEER", - value: "Genderqueer", - }, { - gender_type_id: syntheticUlid(), - code: "PREFER_NOT_TO_ANSWER", - value: "Prefer not to answer", - }]); - -const partyRelationTypeInsertion = udm - .partyRelationType.insertDML([{ - party_relation_type_id: syntheticUlid(), - code: "PERSON_TO_PERSON", - value: "Person To Person", - }, { - party_relation_type_id: syntheticUlid(), - code: "ORGANIZATION_TO_PERSON", - value: "Organization To Person", - }, { - party_relation_type_id: syntheticUlid(), - code: "ORGANIZATION_TO_ORGANIZATION", - value: "Organization To Organization", - }]); - const securityResponseTeamView = SQLa.safeViewDefinition( "security_incident_response_team_view", { @@ -2140,6 +1519,7 @@ const assetServiceView = SQLa.safeViewDefinition( { name: udm.text(), server: udm.text(), + organization_id: udm.text(), boundary: udm.text(), description: udm.text(), port: udm.text(), @@ -2161,7 +1541,7 @@ const assetServiceView = SQLa.safeViewDefinition( }, )` SELECT - asser.name,ast.name as server,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, + asser.name,ast.name as server,ast.organization_id,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, asser.vendor_link,asser.installation_date,asser.criticality,o.name AS owner,sta.value as tag, ast.criticality as asset_criticality,ast.asymmetric_keys_encryption_enabled as asymmetric_keys, ast.cryptographic_key_encryption_enabled as cryptographic_key,ast.symmetric_keys_encryption_enabled as symmetric_keys FROM asset_service asser @@ -2248,83 +1628,5 @@ export function sqlDDL() { -- seed Data ${allReferenceTables.map(e => e.seedDML).flat()} - - ${partyRoleInsertion} - - ${partyIdentifierTypeInsertion} - - ${partyTypeInsertion} - - ${sexTypeInsertion} - - ${genderTypeInsertion} - - ${partyRelationTypeInsertion} - - ${personTypeInsertion} - - ${contactTypeInsertion} - - ${organizationRoleTypeInsertion} - - ${contractStatusInsertion} - - ${paymentTypeInsertion} - - ${periodicityInsertion} - - ${boundaryNatureInsertion} - - ${timeEntryCategoryInsertion} - - ${raciMatrixSubjectInsertion} - - ${skillNatureInsertion} - - ${skillInsertion} - - ${assetStatusInsertion} - - ${assetServiceStatusInsertion} - - ${assetTypeInsertion} - - ${assignmentInsertion} - - ${threatSourceTypeInsertion} - - ${threatEventTypeInsertion} - - ${calendarPeriodInsertion} - - ${trackingPeriodInsertion} - - ${auditPurposeInsertion} - - ${auditorStatusTypeInsertion} - - ${trainingSubjectInsertion} - - ${statusValuesInsertion} - - ${ratingValueInsertion} - - ${contractTypeInsertion} - - ${graphNatureInsertion} - - ${assetRiskTypeInsertion} - - ${riskSubjectInsertion} - - ${riskTypeInsertion} - - ${incidentCategoryInsertion} - - ${incidentSubCategoryInsertion} - - ${incidentTypeInsertion} - - ${incidentStatusInsertion} `; } diff --git a/pattern/infra-assurance/models_test.fixture.puml b/pattern/infra-assurance/models_test.fixture.puml index aa0d6115..da1ebec3 100644 --- a/pattern/infra-assurance/models_test.fixture.puml +++ b/pattern/infra-assurance/models_test.fixture.puml @@ -283,7 +283,7 @@ } entity "contract_status" as contract_status { - **contract_status_id**: INTEGER + * **contract_status_id**: TEXT -- * code: TEXT * value: TEXT @@ -297,7 +297,7 @@ } entity "payment_type" as payment_type { - **payment_type_id**: INTEGER + * **payment_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -311,7 +311,7 @@ } entity "periodicity" as periodicity { - **periodicity_id**: INTEGER + * **periodicity_id**: TEXT -- * code: TEXT * value: TEXT @@ -325,7 +325,7 @@ } entity "boundary_nature" as boundary_nature { - **boundary_nature_id**: INTEGER + * **boundary_nature_id**: TEXT -- * code: TEXT * value: TEXT @@ -339,7 +339,7 @@ } entity "time_entry_category" as time_entry_category { - **time_entry_category_id**: INTEGER + * **time_entry_category_id**: TEXT -- * code: TEXT * value: TEXT @@ -353,7 +353,7 @@ } entity "raci_matrix_subject" as raci_matrix_subject { - **raci_matrix_subject_id**: INTEGER + * **raci_matrix_subject_id**: TEXT -- * code: TEXT * value: TEXT @@ -367,7 +367,7 @@ } entity "skill_nature" as skill_nature { - **skill_nature_id**: INTEGER + * **skill_nature_id**: TEXT -- * code: TEXT * value: TEXT @@ -381,7 +381,7 @@ } entity "skill" as skill { - **skill_id**: INTEGER + * **skill_id**: TEXT -- * code: TEXT * value: TEXT @@ -411,7 +411,7 @@ entity "graph" as graph { * **graph_id**: TEXT -- - * graph_nature_id: INTEGER + * graph_nature_id: TEXT * name: TEXT description: TEXT created_at: TIMESTAMPTZ @@ -428,7 +428,7 @@ -- parent_boundary_id: TEXT * graph_id: TEXT - * boundary_nature_id: INTEGER + * boundary_nature_id: TEXT * name: TEXT description: TEXT created_at: TIMESTAMPTZ @@ -468,7 +468,7 @@ } entity "asset_status" as asset_status { - **asset_status_id**: INTEGER + * **asset_status_id**: TEXT -- * code: TEXT * value: TEXT @@ -482,7 +482,21 @@ } entity "asset_service_status" as asset_service_status { - **asset_service_status_id**: INTEGER + * **asset_service_status_id**: TEXT + -- + * code: TEXT + * value: TEXT + created_at: TIMESTAMPTZ + created_by: TEXT + updated_at: TIMESTAMPTZ + updated_by: TEXT + deleted_at: TIMESTAMPTZ + deleted_by: TEXT + activity_log: TEXT + } + + entity "asset_service_type" as asset_service_type { + * **asset_service_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -496,7 +510,7 @@ } entity "asset_type" as asset_type { - **asset_type_id**: INTEGER + * **asset_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -510,7 +524,7 @@ } entity "assignment" as assignment { - **assignment_id**: INTEGER + * **assignment_id**: TEXT -- * code: TEXT * value: TEXT @@ -544,7 +558,7 @@ * **raci_matrix_subject_boundary_id**: TEXT -- * boundary_id: TEXT - * raci_matrix_subject_id: INTEGER + * raci_matrix_subject_id: TEXT created_at: TIMESTAMPTZ created_by: TEXT updated_at: TIMESTAMPTZ @@ -573,13 +587,13 @@ * organization_id: TEXT boundary_id: TEXT asset_retired_date: DATE - * asset_status_id: INTEGER + * asset_status_id: TEXT * asset_tag: TEXT * name: TEXT * description: TEXT - * asset_type_id: INTEGER + * asset_type_id: TEXT * asset_workload_category: TEXT - * assignment_id: INTEGER + * assignment_id: TEXT * barcode_or_rfid_tag: TEXT installed_date: DATE planned_retirement_date: DATE @@ -606,9 +620,10 @@ * **asset_service_id**: TEXT -- * asset_id: TEXT + * asset_service_type_id: TEXT * name: TEXT * description: TEXT - * asset_service_status_id: INTEGER + * asset_service_status_id: TEXT * port: TEXT * experimental_version: TEXT * production_version: TEXT @@ -669,7 +684,7 @@ -- * title: TEXT * identifier: TEXT - * threat_source_type_id: INTEGER + * threat_source_type_id: TEXT * source_of_information: TEXT * capability: TEXT * intent: TEXT @@ -691,7 +706,7 @@ * threat_source_id: TEXT * asset_id: TEXT * identifier: TEXT - * threat_event_type_id: INTEGER + * threat_event_type_id: TEXT * event_classification: TEXT * source_of_information: TEXT * description: TEXT @@ -707,7 +722,7 @@ entity "asset_risk" as asset_risk { * **asset_risk_id**: TEXT -- - * asset_risk_type_id: INTEGER + * asset_risk_type_id: TEXT * asset_id: TEXT * threat_event_id: TEXT relevance_id: TEXT @@ -810,9 +825,9 @@ * **timesheet_id**: TEXT -- * date_of_work: TIMESTAMPTZ - * is_billable_id: INTEGER + * is_billable_id: TEXT * number_of_hours: INTEGER - * time_entry_category_id: INTEGER + * time_entry_category_id: TEXT * timesheet_summary: TEXT created_at: TIMESTAMPTZ created_by: TEXT @@ -870,10 +885,10 @@ entity "security_incident_response_team" as security_incident_response_team { * **security_incident_response_team_id**: TEXT -- - training_subject_id: INTEGER + training_subject_id: TEXT * person_id: TEXT * organization_id: TEXT - training_status_id: INTEGER + training_status_id: TEXT attended_date: DATE created_at: TIMESTAMPTZ created_by: TEXT @@ -887,10 +902,10 @@ entity "awareness_training" as awareness_training { * **awareness_training_id**: TEXT -- - * training_subject_id: INTEGER + * training_subject_id: TEXT * person_id: TEXT * organization_id: TEXT - * training_status_id: INTEGER + * training_status_id: TEXT * attended_date: DATE created_at: TIMESTAMPTZ created_by: TEXT @@ -906,11 +921,11 @@ -- * author_id: TEXT * rating_given_to_id: TEXT - * rating_value_id: INTEGER - best_rating_id: INTEGER + * rating_value_id: TEXT + best_rating_id: TEXT * rating_explanation: TEXT * review_aspect: TEXT - worst_rating_id: INTEGER + worst_rating_id: TEXT created_at: TIMESTAMPTZ created_by: TEXT updated_at: TIMESTAMPTZ @@ -935,7 +950,7 @@ } entity "threat_source_type" as threat_source_type { - **threat_source_type_id**: INTEGER + * **threat_source_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -949,7 +964,7 @@ } entity "threat_event_type" as threat_event_type { - **threat_event_type_id**: INTEGER + * **threat_event_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -963,7 +978,7 @@ } entity "calendar_period" as calendar_period { - **calendar_period_id**: INTEGER + * **calendar_period_id**: TEXT -- * code: TEXT * value: TEXT @@ -977,7 +992,7 @@ } entity "tracking_period" as tracking_period { - **tracking_period_id**: INTEGER + * **tracking_period_id**: TEXT -- * code: TEXT * value: TEXT @@ -994,10 +1009,10 @@ * **audit_assertion_id**: TEXT -- * auditor_type_id: TEXT - * audit_purpose_id: INTEGER + * audit_purpose_id: TEXT * auditor_org_id: TEXT * auditor_person_id: TEXT - * auditor_status_type_id: INTEGER + * auditor_status_type_id: TEXT * scf_identifier: TEXT * auditor_notes: TEXT * auditor_artifacts: TEXT @@ -1017,13 +1032,13 @@ -- * contract_from_id: TEXT * contract_to_id: TEXT - contract_status_id: INTEGER + contract_status_id: TEXT * document_reference: TEXT - payment_type_id: INTEGER - periodicity_id: INTEGER + payment_type_id: TEXT + periodicity_id: TEXT * start_date: TIMESTAMPTZ end_date: TIMESTAMPTZ - contract_type_id: INTEGER + contract_type_id: TEXT date_of_last_review: TIMESTAMPTZ date_of_next_review: TIMESTAMPTZ date_of_contract_review: TIMESTAMPTZ @@ -1041,15 +1056,15 @@ * **risk_register_id**: TEXT -- * description: TEXT - * risk_subject_id: INTEGER - * risk_type_id: INTEGER + * risk_subject_id: TEXT + * risk_type_id: TEXT * impact_to_the_organization: TEXT - rating_likelihood_id: INTEGER - rating_impact_id: INTEGER - rating_overall_risk_id: INTEGER + rating_likelihood_id: TEXT + rating_impact_id: TEXT + rating_overall_risk_id: TEXT * controls_in_place: TEXT * control_effectivenes: INTEGER - over_all_residual_risk_rating_id: INTEGER + over_all_residual_risk_rating_id: TEXT * mitigation_further_actions: TEXT * control_monitor_mitigation_actions_tracking_strategy: TEXT control_monitor_action_due_date: DATE @@ -1070,11 +1085,11 @@ * incident_date: DATE * time_and_time_zone: TIMESTAMPTZ * asset_id: TEXT - * category_id: INTEGER - * sub_category_id: INTEGER + * category_id: TEXT + * sub_category_id: TEXT * severity_id: TEXT priority_id: TEXT - internal_or_external_id: INTEGER + internal_or_external_id: TEXT * location: TEXT * it_service_impacted: TEXT * impacted_modules: TEXT @@ -1090,7 +1105,7 @@ * eradication_details: TEXT * business_impact: TEXT * lessons_learned: TEXT - status_id: INTEGER + status_id: TEXT closed_date: DATE reopened_time: TIMESTAMPTZ * feedback_from_business: TEXT @@ -1132,7 +1147,7 @@ * **raci_matrix_assignment_id**: TEXT -- * person_id: TEXT - * subject_id: INTEGER + * subject_id: TEXT * activity_id: TEXT * raci_matrix_assignment_nature_id: TEXT created_at: TIMESTAMPTZ @@ -1148,8 +1163,8 @@ * **person_skill_id**: TEXT -- * person_id: TEXT - * skill_nature_id: INTEGER - * skill_id: INTEGER + * skill_nature_id: TEXT + * skill_id: TEXT * proficiency_scale_id: TEXT created_at: TIMESTAMPTZ created_by: TEXT @@ -1179,7 +1194,7 @@ -- * key_performance_id: TEXT * asset_id: TEXT - * calendar_period_id: INTEGER + * calendar_period_id: TEXT * kpi_comparison_operator_id: TEXT * kpi_context: TEXT * kpi_lower_threshold_critical: TEXT @@ -1197,7 +1212,7 @@ * kpi_unit_of_measure: TEXT * kpi_value: TEXT * score: TEXT - * tracking_period_id: INTEGER + * tracking_period_id: TEXT * trend_id: TEXT created_at: TIMESTAMPTZ created_by: TEXT @@ -1293,7 +1308,7 @@ } entity "training_subject" as training_subject { - **training_subject_id**: INTEGER + * **training_subject_id**: TEXT -- * code: TEXT * value: TEXT @@ -1307,7 +1322,7 @@ } entity "status_value" as status_value { - **status_value_id**: INTEGER + * **status_value_id**: TEXT -- * code: TEXT * value: TEXT @@ -1321,7 +1336,7 @@ } entity "rating_value" as rating_value { - **rating_value_id**: INTEGER + * **rating_value_id**: TEXT -- * code: TEXT * value: TEXT @@ -1335,7 +1350,7 @@ } entity "contract_type" as contract_type { - **contract_type_id**: INTEGER + * **contract_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -1349,7 +1364,7 @@ } entity "graph_nature" as graph_nature { - **graph_nature_id**: INTEGER + * **graph_nature_id**: TEXT -- * code: TEXT * value: TEXT @@ -1363,7 +1378,7 @@ } entity "risk_subject" as risk_subject { - **risk_subject_id**: INTEGER + * **risk_subject_id**: TEXT -- * code: TEXT * value: TEXT @@ -1377,7 +1392,7 @@ } entity "risk_type" as risk_type { - **risk_type_id**: INTEGER + * **risk_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -1391,7 +1406,7 @@ } entity "incident_category" as incident_category { - **incident_category_id**: INTEGER + * **incident_category_id**: TEXT -- * code: TEXT * value: TEXT @@ -1405,7 +1420,7 @@ } entity "incident_sub_category" as incident_sub_category { - **incident_sub_category_id**: INTEGER + * **incident_sub_category_id**: TEXT -- * code: TEXT * value: TEXT @@ -1419,7 +1434,7 @@ } entity "incident_type" as incident_type { - **incident_type_id**: INTEGER + * **incident_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -1433,7 +1448,7 @@ } entity "incident_status" as incident_status { - **incident_status_id**: INTEGER + * **incident_status_id**: TEXT -- * code: TEXT * value: TEXT @@ -1447,7 +1462,7 @@ } entity "asset_risk_type" as asset_risk_type { - **asset_risk_type_id**: INTEGER + * **asset_risk_type_id**: TEXT -- * code: TEXT * value: TEXT @@ -1461,7 +1476,7 @@ } entity "audit_purpose" as audit_purpose { - **audit_purpose_id**: INTEGER + * **audit_purpose_id**: TEXT -- * code: TEXT * value: TEXT @@ -1475,7 +1490,7 @@ } entity "audit_status" as audit_status { - **audit_status_id**: INTEGER + * **audit_status_id**: TEXT -- * code: TEXT * value: TEXT @@ -1520,6 +1535,7 @@ asset_type |o..o{ asset assignment |o..o{ asset asset |o..o{ asset_service + asset_service_type |o..o{ asset_service asset_service_status |o..o{ asset_service vulnerability_source |o..o{ vulnerability threat_source_type |o..o{ threat_source diff --git a/pattern/infra-assurance/models_test.fixture.sh b/pattern/infra-assurance/models_test.fixture.sh index 089e03b8..9a73e8db 100644 --- a/pattern/infra-assurance/models_test.fixture.sh +++ b/pattern/infra-assurance/models_test.fixture.sh @@ -364,7 +364,7 @@ CREATE TABLE IF NOT EXISTS "contact_land" ( FOREIGN KEY("party_id") REFERENCES "party"("party_id") ); CREATE TABLE IF NOT EXISTS "contract_status" ( - "contract_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "contract_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -377,7 +377,7 @@ CREATE TABLE IF NOT EXISTS "contract_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "payment_type" ( - "payment_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "payment_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -390,7 +390,7 @@ CREATE TABLE IF NOT EXISTS "payment_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "periodicity" ( - "periodicity_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "periodicity_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -403,7 +403,7 @@ CREATE TABLE IF NOT EXISTS "periodicity" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "boundary_nature" ( - "boundary_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "boundary_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -416,7 +416,7 @@ CREATE TABLE IF NOT EXISTS "boundary_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "time_entry_category" ( - "time_entry_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "time_entry_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -429,7 +429,7 @@ CREATE TABLE IF NOT EXISTS "time_entry_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "raci_matrix_subject" ( - "raci_matrix_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "raci_matrix_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -442,7 +442,7 @@ CREATE TABLE IF NOT EXISTS "raci_matrix_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "skill_nature" ( - "skill_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "skill_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -455,7 +455,7 @@ CREATE TABLE IF NOT EXISTS "skill_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "skill" ( - "skill_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "skill_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -482,7 +482,7 @@ CREATE TABLE IF NOT EXISTS "organization_role_type" ( ); CREATE TABLE IF NOT EXISTS "graph" ( "graph_id" TEXT PRIMARY KEY NOT NULL, - "graph_nature_id" INTEGER NOT NULL, + "graph_nature_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -498,7 +498,7 @@ CREATE TABLE IF NOT EXISTS "boundary" ( "boundary_id" TEXT PRIMARY KEY NOT NULL, "parent_boundary_id" TEXT, "graph_id" TEXT NOT NULL, - "boundary_nature_id" INTEGER NOT NULL, + "boundary_nature_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -538,7 +538,7 @@ CREATE TABLE IF NOT EXISTS "host_boundary" ( FOREIGN KEY("host_id") REFERENCES "host"("host_id") ); CREATE TABLE IF NOT EXISTS "asset_status" ( - "asset_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -551,7 +551,20 @@ CREATE TABLE IF NOT EXISTS "asset_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_service_status" ( - "asset_service_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_service_status_id" TEXT PRIMARY KEY NOT NULL, + "code" TEXT /* UNIQUE COLUMN */ NOT NULL, + "value" TEXT NOT NULL, + "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, + "created_by" TEXT DEFAULT 'UNKNOWN', + "updated_at" TIMESTAMPTZ, + "updated_by" TEXT, + "deleted_at" TIMESTAMPTZ, + "deleted_by" TEXT, + "activity_log" TEXT, + UNIQUE("code") +); +CREATE TABLE IF NOT EXISTS "asset_service_type" ( + "asset_service_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -564,7 +577,7 @@ CREATE TABLE IF NOT EXISTS "asset_service_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_type" ( - "asset_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -577,7 +590,7 @@ CREATE TABLE IF NOT EXISTS "asset_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "assignment" ( - "assignment_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "assignment_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -607,7 +620,7 @@ CREATE TABLE IF NOT EXISTS "raci_matrix" ( CREATE TABLE IF NOT EXISTS "raci_matrix_subject_boundary" ( "raci_matrix_subject_boundary_id" TEXT PRIMARY KEY NOT NULL, "boundary_id" TEXT NOT NULL, - "raci_matrix_subject_id" INTEGER NOT NULL, + "raci_matrix_subject_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', "updated_at" TIMESTAMPTZ, @@ -634,13 +647,13 @@ CREATE TABLE IF NOT EXISTS "asset" ( "organization_id" TEXT NOT NULL, "boundary_id" TEXT, "asset_retired_date" DATE, - "asset_status_id" INTEGER NOT NULL, + "asset_status_id" TEXT NOT NULL, "asset_tag" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT NOT NULL, - "asset_type_id" INTEGER NOT NULL, + "asset_type_id" TEXT NOT NULL, "asset_workload_category" TEXT NOT NULL, - "assignment_id" INTEGER NOT NULL, + "assignment_id" TEXT NOT NULL, "barcode_or_rfid_tag" TEXT NOT NULL, "installed_date" DATE, "planned_retirement_date" DATE, @@ -670,9 +683,10 @@ CREATE TABLE IF NOT EXISTS "asset" ( CREATE TABLE IF NOT EXISTS "asset_service" ( "asset_service_id" TEXT PRIMARY KEY NOT NULL, "asset_id" TEXT NOT NULL, + "asset_service_type_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT NOT NULL, - "asset_service_status_id" INTEGER NOT NULL, + "asset_service_status_id" TEXT NOT NULL, "port" TEXT NOT NULL, "experimental_version" TEXT NOT NULL, "production_version" TEXT NOT NULL, @@ -691,6 +705,7 @@ CREATE TABLE IF NOT EXISTS "asset_service" ( "deleted_by" TEXT, "activity_log" TEXT, FOREIGN KEY("asset_id") REFERENCES "asset"("asset_id"), + FOREIGN KEY("asset_service_type_id") REFERENCES "asset_service_type"("asset_service_type_id"), FOREIGN KEY("asset_service_status_id") REFERENCES "asset_service_status"("asset_service_status_id") ); CREATE TABLE IF NOT EXISTS "vulnerability_source" ( @@ -732,7 +747,7 @@ CREATE TABLE IF NOT EXISTS "threat_source" ( "threat_source_id" TEXT PRIMARY KEY NOT NULL, "title" TEXT NOT NULL, "identifier" TEXT NOT NULL, - "threat_source_type_id" INTEGER NOT NULL, + "threat_source_type_id" TEXT NOT NULL, "source_of_information" TEXT NOT NULL, "capability" TEXT NOT NULL, "intent" TEXT NOT NULL, @@ -753,7 +768,7 @@ CREATE TABLE IF NOT EXISTS "threat_event" ( "threat_source_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, "identifier" TEXT NOT NULL, - "threat_event_type_id" INTEGER NOT NULL, + "threat_event_type_id" TEXT NOT NULL, "event_classification" TEXT NOT NULL, "source_of_information" TEXT NOT NULL, "description" TEXT NOT NULL, @@ -770,7 +785,7 @@ CREATE TABLE IF NOT EXISTS "threat_event" ( ); CREATE TABLE IF NOT EXISTS "asset_risk" ( "asset_risk_id" TEXT PRIMARY KEY NOT NULL, - "asset_risk_type_id" INTEGER NOT NULL, + "asset_risk_type_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, "threat_event_id" TEXT NOT NULL, "relevance_id" TEXT, @@ -875,9 +890,9 @@ CREATE TABLE IF NOT EXISTS "scheduled_task" ( CREATE TABLE IF NOT EXISTS "timesheet" ( "timesheet_id" TEXT PRIMARY KEY NOT NULL, "date_of_work" TIMESTAMPTZ NOT NULL, - "is_billable_id" INTEGER NOT NULL, + "is_billable_id" TEXT NOT NULL, "number_of_hours" INTEGER NOT NULL, - "time_entry_category_id" INTEGER NOT NULL, + "time_entry_category_id" TEXT NOT NULL, "timesheet_summary" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -931,10 +946,10 @@ CREATE TABLE IF NOT EXISTS "device" ( ); CREATE TABLE IF NOT EXISTS "security_incident_response_team" ( "security_incident_response_team_id" TEXT PRIMARY KEY NOT NULL, - "training_subject_id" INTEGER, + "training_subject_id" TEXT, "person_id" TEXT NOT NULL, "organization_id" TEXT NOT NULL, - "training_status_id" INTEGER, + "training_status_id" TEXT, "attended_date" DATE, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -950,10 +965,10 @@ CREATE TABLE IF NOT EXISTS "security_incident_response_team" ( ); CREATE TABLE IF NOT EXISTS "awareness_training" ( "awareness_training_id" TEXT PRIMARY KEY NOT NULL, - "training_subject_id" INTEGER NOT NULL, + "training_subject_id" TEXT NOT NULL, "person_id" TEXT NOT NULL, "organization_id" TEXT NOT NULL, - "training_status_id" INTEGER NOT NULL, + "training_status_id" TEXT NOT NULL, "attended_date" DATE NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -971,11 +986,11 @@ CREATE TABLE IF NOT EXISTS "rating" ( "rating_id" TEXT PRIMARY KEY NOT NULL, "author_id" TEXT NOT NULL, "rating_given_to_id" TEXT NOT NULL, - "rating_value_id" INTEGER NOT NULL, - "best_rating_id" INTEGER, + "rating_value_id" TEXT NOT NULL, + "best_rating_id" TEXT, "rating_explanation" TEXT NOT NULL, "review_aspect" TEXT NOT NULL, - "worst_rating_id" INTEGER, + "worst_rating_id" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', "updated_at" TIMESTAMPTZ, @@ -1003,7 +1018,7 @@ CREATE TABLE IF NOT EXISTS "note" ( FOREIGN KEY("party_id") REFERENCES "party"("party_id") ); CREATE TABLE IF NOT EXISTS "threat_source_type" ( - "threat_source_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "threat_source_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1016,7 +1031,7 @@ CREATE TABLE IF NOT EXISTS "threat_source_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "threat_event_type" ( - "threat_event_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "threat_event_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1029,7 +1044,7 @@ CREATE TABLE IF NOT EXISTS "threat_event_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "calendar_period" ( - "calendar_period_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "calendar_period_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1042,7 +1057,7 @@ CREATE TABLE IF NOT EXISTS "calendar_period" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "tracking_period" ( - "tracking_period_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "tracking_period_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1057,10 +1072,10 @@ CREATE TABLE IF NOT EXISTS "tracking_period" ( CREATE TABLE IF NOT EXISTS "audit_assertion" ( "audit_assertion_id" TEXT PRIMARY KEY NOT NULL, "auditor_type_id" TEXT NOT NULL, - "audit_purpose_id" INTEGER NOT NULL, + "audit_purpose_id" TEXT NOT NULL, "auditor_org_id" TEXT NOT NULL, "auditor_person_id" TEXT NOT NULL, - "auditor_status_type_id" INTEGER NOT NULL, + "auditor_status_type_id" TEXT NOT NULL, "scf_identifier" TEXT NOT NULL, "auditor_notes" TEXT NOT NULL, "auditor_artifacts" TEXT NOT NULL, @@ -1083,13 +1098,13 @@ CREATE TABLE IF NOT EXISTS "contract" ( "contract_id" TEXT PRIMARY KEY NOT NULL, "contract_from_id" TEXT NOT NULL, "contract_to_id" TEXT NOT NULL, - "contract_status_id" INTEGER, + "contract_status_id" TEXT, "document_reference" TEXT NOT NULL, - "payment_type_id" INTEGER, - "periodicity_id" INTEGER, + "payment_type_id" TEXT, + "periodicity_id" TEXT, "start_date" TIMESTAMPTZ NOT NULL, "end_date" TIMESTAMPTZ, - "contract_type_id" INTEGER, + "contract_type_id" TEXT, "date_of_last_review" TIMESTAMPTZ, "date_of_next_review" TIMESTAMPTZ, "date_of_contract_review" TIMESTAMPTZ, @@ -1111,15 +1126,15 @@ CREATE TABLE IF NOT EXISTS "contract" ( CREATE TABLE IF NOT EXISTS "risk_register" ( "risk_register_id" TEXT PRIMARY KEY NOT NULL, "description" TEXT NOT NULL, - "risk_subject_id" INTEGER NOT NULL, - "risk_type_id" INTEGER NOT NULL, + "risk_subject_id" TEXT NOT NULL, + "risk_type_id" TEXT NOT NULL, "impact_to_the_organization" TEXT NOT NULL, - "rating_likelihood_id" INTEGER, - "rating_impact_id" INTEGER, - "rating_overall_risk_id" INTEGER, + "rating_likelihood_id" TEXT, + "rating_impact_id" TEXT, + "rating_overall_risk_id" TEXT, "controls_in_place" TEXT NOT NULL, "control_effectivenes" INTEGER NOT NULL, - "over_all_residual_risk_rating_id" INTEGER, + "over_all_residual_risk_rating_id" TEXT, "mitigation_further_actions" TEXT NOT NULL, "control_monitor_mitigation_actions_tracking_strategy" TEXT NOT NULL, "control_monitor_action_due_date" DATE, @@ -1145,11 +1160,11 @@ CREATE TABLE IF NOT EXISTS "incident" ( "incident_date" DATE NOT NULL, "time_and_time_zone" TIMESTAMPTZ NOT NULL, "asset_id" TEXT NOT NULL, - "category_id" INTEGER NOT NULL, - "sub_category_id" INTEGER NOT NULL, + "category_id" TEXT NOT NULL, + "sub_category_id" TEXT NOT NULL, "severity_id" TEXT NOT NULL, "priority_id" TEXT, - "internal_or_external_id" INTEGER, + "internal_or_external_id" TEXT, "location" TEXT NOT NULL, "it_service_impacted" TEXT NOT NULL, "impacted_modules" TEXT NOT NULL, @@ -1165,7 +1180,7 @@ CREATE TABLE IF NOT EXISTS "incident" ( "eradication_details" TEXT NOT NULL, "business_impact" TEXT NOT NULL, "lessons_learned" TEXT NOT NULL, - "status_id" INTEGER, + "status_id" TEXT, "closed_date" DATE, "reopened_time" TIMESTAMPTZ, "feedback_from_business" TEXT NOT NULL, @@ -1216,7 +1231,7 @@ CREATE TABLE IF NOT EXISTS "incident_root_cause" ( CREATE TABLE IF NOT EXISTS "raci_matrix_assignment" ( "raci_matrix_assignment_id" TEXT PRIMARY KEY NOT NULL, "person_id" TEXT NOT NULL, - "subject_id" INTEGER NOT NULL, + "subject_id" TEXT NOT NULL, "activity_id" TEXT NOT NULL, "raci_matrix_assignment_nature_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1234,8 +1249,8 @@ CREATE TABLE IF NOT EXISTS "raci_matrix_assignment" ( CREATE TABLE IF NOT EXISTS "person_skill" ( "person_skill_id" TEXT PRIMARY KEY NOT NULL, "person_id" TEXT NOT NULL, - "skill_nature_id" INTEGER NOT NULL, - "skill_id" INTEGER NOT NULL, + "skill_nature_id" TEXT NOT NULL, + "skill_id" TEXT NOT NULL, "proficiency_scale_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -1265,7 +1280,7 @@ CREATE TABLE IF NOT EXISTS "key_performance_indicator" ( "key_performance_indicator_id" TEXT PRIMARY KEY NOT NULL, "key_performance_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, - "calendar_period_id" INTEGER NOT NULL, + "calendar_period_id" TEXT NOT NULL, "kpi_comparison_operator_id" TEXT NOT NULL, "kpi_context" TEXT NOT NULL, "kpi_lower_threshold_critical" TEXT NOT NULL, @@ -1283,7 +1298,7 @@ CREATE TABLE IF NOT EXISTS "key_performance_indicator" ( "kpi_unit_of_measure" TEXT NOT NULL, "kpi_value" TEXT NOT NULL, "score" TEXT NOT NULL, - "tracking_period_id" INTEGER NOT NULL, + "tracking_period_id" TEXT NOT NULL, "trend_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -1381,7 +1396,7 @@ CREATE TABLE IF NOT EXISTS "attestation_evidence" ( FOREIGN KEY("attestation_id") REFERENCES "attestation"("attestation_id") ); CREATE TABLE IF NOT EXISTS "training_subject" ( - "training_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "training_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1394,7 +1409,7 @@ CREATE TABLE IF NOT EXISTS "training_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "status_value" ( - "status_value_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "status_value_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1407,7 +1422,7 @@ CREATE TABLE IF NOT EXISTS "status_value" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "rating_value" ( - "rating_value_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "rating_value_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1420,7 +1435,7 @@ CREATE TABLE IF NOT EXISTS "rating_value" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "contract_type" ( - "contract_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "contract_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1433,7 +1448,7 @@ CREATE TABLE IF NOT EXISTS "contract_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "graph_nature" ( - "graph_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "graph_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1446,7 +1461,7 @@ CREATE TABLE IF NOT EXISTS "graph_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "risk_subject" ( - "risk_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "risk_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1459,7 +1474,7 @@ CREATE TABLE IF NOT EXISTS "risk_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "risk_type" ( - "risk_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "risk_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1472,7 +1487,7 @@ CREATE TABLE IF NOT EXISTS "risk_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_category" ( - "incident_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1485,7 +1500,7 @@ CREATE TABLE IF NOT EXISTS "incident_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_sub_category" ( - "incident_sub_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_sub_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1498,7 +1513,7 @@ CREATE TABLE IF NOT EXISTS "incident_sub_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_type" ( - "incident_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1511,7 +1526,7 @@ CREATE TABLE IF NOT EXISTS "incident_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_status" ( - "incident_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1524,7 +1539,7 @@ CREATE TABLE IF NOT EXISTS "incident_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_risk_type" ( - "asset_risk_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_risk_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1537,7 +1552,7 @@ CREATE TABLE IF NOT EXISTS "asset_risk_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "audit_purpose" ( - "audit_purpose_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "audit_purpose_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1550,7 +1565,7 @@ CREATE TABLE IF NOT EXISTS "audit_purpose" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "audit_status" ( - "audit_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "audit_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1737,9 +1752,9 @@ CREATE VIEW IF NOT EXISTS "contract_view"("contract_by", "contract_to", "payment INNER JOIN contract_status cs on cs.code = ct.contract_status_id INNER JOIN contract_type ctp on ctp.code = ct.contract_type_id INNER JOIN periodicity p on p.code = ct.periodicity_id; -CREATE VIEW IF NOT EXISTS "asset_service_view"("name", "server", "boundary", "description", "port", "experimental_version", "production_version", "latest_vendor_version", "resource_utilization", "log_file", "url", "vendor_link", "installation_date", "criticality", "owner", "tag", "asset_criticality", "asymmetric_keys", "cryptographic_key", "symmetric_keys") AS +CREATE VIEW IF NOT EXISTS "asset_service_view"("name", "server", "organization_id", "boundary", "description", "port", "experimental_version", "production_version", "latest_vendor_version", "resource_utilization", "log_file", "url", "vendor_link", "installation_date", "criticality", "owner", "tag", "asset_criticality", "asymmetric_keys", "cryptographic_key", "symmetric_keys") AS SELECT - asser.name,ast.name as server,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, + asser.name,ast.name as server,ast.organization_id,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, asser.vendor_link,asser.installation_date,asser.criticality,o.name AS owner,sta.value as tag, ast.criticality as asset_criticality,ast.asymmetric_keys_encryption_enabled as asymmetric_keys, ast.cryptographic_key_encryption_enabled as cryptographic_key,ast.symmetric_keys_encryption_enabled as symmetric_keys FROM asset_service asser @@ -1822,412 +1837,6 @@ INSERT INTO "severity" ("code", "value") VALUES ('LOW', 'Low'); INSERT INTO "priority" ("code", "value") VALUES ('HIGH', 'High'); INSERT INTO "priority" ("code", "value") VALUES ('MEDIUM', 'Medium'); INSERT INTO "priority" ("code", "value") VALUES ('LOW', 'Low'); - -INSERT INTO "party_role" ("party_role_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('1', 'VENDOR', 'Vendor', NULL, NULL, NULL, NULL, NULL, NULL), - ('2', 'CUSTOMER', 'Customer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_identifier_type" ("party_identifier_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('3', 'PASSPORT', 'Passport', NULL, NULL, NULL, NULL, NULL, NULL), - ('4', 'UUID', 'UUID', NULL, NULL, NULL, NULL, NULL, NULL), - ('5', 'DRIVING_LICENSE', 'Driving License', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_type" ("party_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('31', 'PERSON', 'Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('32', 'ORGANIZATION', 'Organization', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "sex_type" ("sex_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('33', 'MALE', 'Male', NULL, NULL, NULL, NULL, NULL, NULL), - ('34', 'FEMALE', 'Female', NULL, NULL, NULL, NULL, NULL, NULL), - ('35', 'INTERSEX', 'Intersex', NULL, NULL, NULL, NULL, NULL, NULL), - ('36', 'X', 'X', NULL, NULL, NULL, NULL, NULL, NULL), - ('37', 'NOT_LISTED_PLEASE_DESCRIBE', 'Not listed, please describe', NULL, NULL, NULL, NULL, NULL, NULL), - ('38', 'UNKNOWN', 'Unknown', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "gender_type" ("gender_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('39', 'MALE', 'Male', NULL, NULL, NULL, NULL, NULL, NULL), - ('40', 'FEMALE', 'Female', NULL, NULL, NULL, NULL, NULL, NULL), - ('41', 'OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('42', 'NONBINARY', 'Nonbinary', NULL, NULL, NULL, NULL, NULL, NULL), - ('43', 'AGENDER', 'Agender', NULL, NULL, NULL, NULL, NULL, NULL), - ('44', 'TRANGENDER', 'Transgender', NULL, NULL, NULL, NULL, NULL, NULL), - ('45', 'CISGENDER', 'Cisgender', NULL, NULL, NULL, NULL, NULL, NULL), - ('46', 'GENDERQUEER', 'Genderqueer', NULL, NULL, NULL, NULL, NULL, NULL), - ('47', 'PREFER_NOT_TO_ANSWER', 'Prefer not to answer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_relation_type" ("party_relation_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('48', 'PERSON_TO_PERSON', 'Person To Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('49', 'ORGANIZATION_TO_PERSON', 'Organization To Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('50', 'ORGANIZATION_TO_ORGANIZATION', 'Organization To Organization', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "person_type" ("person_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('6', 'INDIVIDUAL', 'Individual', NULL, NULL, NULL, NULL, NULL, NULL), - ('7', 'PROFESSIONAL', 'Professional', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contact_type" ("contact_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('8', 'HOME_ADDRESS', 'Home Address', NULL, NULL, NULL, NULL, NULL, NULL), - ('9', 'OFFICIAL_ADDRESS', 'Official Address', NULL, NULL, NULL, NULL, NULL, NULL), - ('10', 'MOBILE_PHONE_NUMBER', 'Mobile Phone Number', NULL, NULL, NULL, NULL, NULL, NULL), - ('11', 'LAND_PHONE_NUMBER', 'Land Phone Number', NULL, NULL, NULL, NULL, NULL, NULL), - ('12', 'OFFICIAL_EMAIL', 'Official Email', NULL, NULL, NULL, NULL, NULL, NULL), - ('13', 'PERSONAL_EMAIL', 'Personal Email', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "organization_role_type" ("organization_role_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('14', 'PROJECT_MANAGER_TECHNOLOGY', 'Project Manager Technology', NULL, NULL, NULL, NULL, NULL, NULL), - ('15', 'PROJECT_MANAGER_QUALITY', 'Project Manager Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('16', 'PROJECT_MANAGER_DEVOPS', 'Project Manager DevOps', NULL, NULL, NULL, NULL, NULL, NULL), - ('17', 'ASSOCIATE_MANAGER_TECHNOLOGY', 'Associated Manager Technology', NULL, NULL, NULL, NULL, NULL, NULL), - ('18', 'ASSOCIATE_MANAGER_QUALITY', 'Associate Manager Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('19', 'ASSOCIATE_MANAGER_DEVOPS', 'Associate Manager DevOps', NULL, NULL, NULL, NULL, NULL, NULL), - ('20', 'SENIOR_LEAD_SOFTWARE_ENGINEER_ARCHITECT', 'Senior Lead Software Engineer Architect', NULL, NULL, NULL, NULL, NULL, NULL), - ('21', 'LEAD_SOFTWARE_ENGINEER_ARCHITECT', 'Lead Software Engineer Architect', NULL, NULL, NULL, NULL, NULL, NULL), - ('22', 'SENIOR_LEAD_SOFTWARE_QUALITY_ENGINEER', 'Senior Lead Software DevOps Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('23', 'LEAD_SOFTWARE_ENGINEER', 'Lead Software Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('24', 'LEAD_SOFTWARE_QUALITY_ENGINEER', 'Lead Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('25', 'LEAD_SOFTWARE_DEVOPS_ENGINEER', 'Lead Software DevOps Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('26', 'LEAD_SYSTEM_NETWORK_ENGINEER', 'Lead System Network Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('27', 'SENIOR_SOFTWARE_ENGINEER', 'Senior Software Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('28', 'SENIOR_SOFTWARE_QUALITY_ENGINEER', 'Senior Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('29', 'SOFTWARE_QUALITY_ENGINEER', 'Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('30', 'SECURITY_ENGINEER', 'Security Engineer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contract_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACTIVE', 'Active', NULL, NULL, NULL, NULL, NULL, NULL), - ('AWAITING_APPROVAL', 'Awaiting Approval', NULL, NULL, NULL, NULL, NULL, NULL), - ('AWAITING_APPROVAL_FOR_RENEWAL', 'Awaiting Approval For Renewal', NULL, NULL, NULL, NULL, NULL, NULL), - ('CANCELED', 'Canceled', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENIED', 'Denied', NULL, NULL, NULL, NULL, NULL, NULL), - ('FINISHED', 'Finished', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_PREPARATION', 'In Preparation', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUOTE_REQUESTED', 'Quote Requested', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUOTED', 'Quoted', NULL, NULL, NULL, NULL, NULL, NULL), - ('STANDARD_CONTRACT', 'Standard Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUSPENDED', 'Suspended', NULL, NULL, NULL, NULL, NULL, NULL), - ('VALIDATED', 'Validated', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "payment_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('BOTH', 'Both', NULL, NULL, NULL, NULL, NULL, NULL), - ('LOANS', 'Loans', NULL, NULL, NULL, NULL, NULL, NULL), - ('NONE', 'None', NULL, NULL, NULL, NULL, NULL, NULL), - ('RENTS', 'Rents', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "periodicity" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ANNUAL', 'Annual', NULL, NULL, NULL, NULL, NULL, NULL), - ('BI_MONTHLY', 'Bi Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('BI_WEEKLY', 'Bi Weekly', NULL, NULL, NULL, NULL, NULL, NULL), - ('DAILY', 'Daily', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONTHLY', 'Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUARTERLY', 'Quarterly', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEMI_ANNUAL', 'Semi Annual', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEMI_MONTHLY', 'Semi Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEEKLY', 'Weekly', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "boundary_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('REGULATORY_TAX_ID', 'Regulatory Tax ID', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "time_entry_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('MISC_MEETINGS', 'Misc Meetings', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_OTHER', 'Misc Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_VACATION', 'Misc Vacation', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_WORK_ITEM', 'Misc Work Item', NULL, NULL, NULL, NULL, NULL, NULL), - ('PACKAGE', 'Package', NULL, NULL, NULL, NULL, NULL, NULL), - ('PROJECT', 'Project', NULL, NULL, NULL, NULL, NULL, NULL), - ('REQUEST', 'Request', NULL, NULL, NULL, NULL, NULL, NULL), - ('TASK', 'Task', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "raci_matrix_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('PROJECT_LEADERSHIP', 'Project Leadership', NULL, NULL, NULL, NULL, NULL, NULL), - ('PROJECT_MANAGEMENT', 'Project Management', NULL, NULL, NULL, NULL, NULL, NULL), - ('APPLICATION_DEVELOPMENT', 'Application Development', NULL, NULL, NULL, NULL, NULL, NULL), - ('DEV_OPERATIONS', 'Dev Operations', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUALITY_ASSURANCE', 'Quality Assurance', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEARCH_ENGINE_OPTIMIZATION', 'Search Engine Optimization', NULL, NULL, NULL, NULL, NULL, NULL), - ('USER_INTERFASE_USABILITY', 'User Interfase And Usability', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_ANALYST', 'Business Analyst (Abm)', NULL, NULL, NULL, NULL, NULL, NULL), - ('CURATION_COORDINATION', 'Curation Coordination', NULL, NULL, NULL, NULL, NULL, NULL), - ('KNOWLEDGE_REPRESENTATION', 'Knowledge Representation', NULL, NULL, NULL, NULL, NULL, NULL), - ('MARKETING_OUTREACH', 'Marketing Outreach', NULL, NULL, NULL, NULL, NULL, NULL), - ('CURATION_WORKS', 'Curation Works', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "skill_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('SOFTWARE', 'Software', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE', 'Hardware', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "skill" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ANGULAR', 'Angular', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENO', 'Deno', NULL, NULL, NULL, NULL, NULL, NULL), - ('TYPESCRIPT', 'Typescript', NULL, NULL, NULL, NULL, NULL, NULL), - ('POSTGRESQL', 'PostgreSQL', NULL, NULL, NULL, NULL, NULL, NULL), - ('MYSQL', 'MySQL', NULL, NULL, NULL, NULL, NULL, NULL), - ('HUGO', 'Hugo', NULL, NULL, NULL, NULL, NULL, NULL), - ('PHP', 'PHP', NULL, NULL, NULL, NULL, NULL, NULL), - ('JAVASCRIPT', 'JavaScript', NULL, NULL, NULL, NULL, NULL, NULL), - ('PYTHON', 'Python', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOT_NET', '.NET', NULL, NULL, NULL, NULL, NULL, NULL), - ('ORACLE', 'Oracle', NULL, NULL, NULL, NULL, NULL, NULL), - ('JAVA', 'Java', NULL, NULL, NULL, NULL, NULL, NULL), - ('JQUERY', 'jQuery', NULL, NULL, NULL, NULL, NULL, NULL), - ('OSQUERY', 'Osquery', NULL, NULL, NULL, NULL, NULL, NULL), - ('REACTJS', 'ReactJs', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AWAITING_RECEIPT', 'Awaiting Receipt', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_STOCK', 'In Stock', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_USE', 'In Use', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING', 'Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETIRED', 'Retired', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_FOR_MAINTENANCE', 'Returned For Maintenance', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_TO_SUPPLIER', 'Returned To Supplier', NULL, NULL, NULL, NULL, NULL, NULL), - ('UNDEFINED', 'Undefined', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_service_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACTIVE', 'Active', NULL, NULL, NULL, NULL, NULL, NULL), - ('INACTIVE', 'Inactive', NULL, NULL, NULL, NULL, NULL, NULL), - ('DELETED', 'DELETED', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCOUNT', 'Account', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_SERVICE', 'Business Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('CABLE', 'Cable', NULL, NULL, NULL, NULL, NULL, NULL), - ('CABLE_DEVICE', 'Cable Device', NULL, NULL, NULL, NULL, NULL, NULL), - ('COLLECTIVE_EQUIPMENT', 'Collective Equipment', NULL, NULL, NULL, NULL, NULL, NULL), - ('COMPUTER', 'Computer', NULL, NULL, NULL, NULL, NULL, NULL), - ('CPU', 'Cpu', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOMAIN', 'Domain', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVER', 'Server', NULL, NULL, NULL, NULL, NULL, NULL), - ('EXTENSION_CARD', 'Extension Card', NULL, NULL, NULL, NULL, NULL, NULL), - ('GLOBAL_SOFTWARE_LICENSE', 'Global Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('LAPTOP', 'Laptop', NULL, NULL, NULL, NULL, NULL, NULL), - ('LASER_PRINTER', 'Laser Printer', NULL, NULL, NULL, NULL, NULL, NULL), - ('LICENSE_CONTRACT', 'License Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('MAINTENANCE_CONTRACT', 'Maintenance Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('MASS_STORAGE', 'Mass Storage', NULL, NULL, NULL, NULL, NULL, NULL), - ('MOBILE_DEVICE', 'Mobile Device', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONITOR', 'Monitor', NULL, NULL, NULL, NULL, NULL, NULL), - ('NETWORK_HARDWARE', 'Network Hardware', NULL, NULL, NULL, NULL, NULL, NULL), - ('NETWORK_INTERFACE', 'Network Interface', NULL, NULL, NULL, NULL, NULL, NULL), - ('OEM_SOFTWARE_LICENSE', 'Oem Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('PRINTER', 'Printer', NULL, NULL, NULL, NULL, NULL, NULL), - ('RACKMOUNT_MONITOR', 'Rackmount Monitor', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCANNER', 'Scanner', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ACCESS_AUTHORIZATION', 'Software Access Authorization', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ACCESS_REMOVAL', 'Software Access Removal', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ADD_WORK_ORDER', 'Software Add Work Order', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_INSTALLATION', 'Software Installation', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_LICENSE', 'Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_REMOVAL_WORK_ORDER', 'Software Removal Work Order', NULL, NULL, NULL, NULL, NULL, NULL), - ('STANDARD_ASSET', 'Standard Asset', NULL, NULL, NULL, NULL, NULL, NULL), - ('TELECOMMUNICATION_EQUIPMENT', 'Telecommunication Equipment', NULL, NULL, NULL, NULL, NULL, NULL), - ('TELEPHONE', 'Telephone', NULL, NULL, NULL, NULL, NULL, NULL), - ('VIRTUAL_MACHINE', 'Virtual Machine', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_POLICY', 'Security Policy', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMPLOYEE_DATA', 'Employee Data', NULL, NULL, NULL, NULL, NULL, NULL), - ('API', 'Api', NULL, NULL, NULL, NULL, NULL, NULL), - ('FIREWALL', 'Firewall', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "assignment" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AWAITING_RECEIPT', 'Awaiting receipt', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_STOCK', 'In Stock', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_USE', 'In Use', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING', 'Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_FOR_MAINTENANCE', 'Returned For Maintenance', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_TO_SUPPLIER', 'Returned To Supplier', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETIRED', 'Retired', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "threat_source_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('PHISHING', 'Phishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPAM', 'Spam', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPYWARE_AND_MALWARE_FOR_EXTORTION', 'Spyware and malware for extortion', NULL, NULL, NULL, NULL, NULL, NULL), - ('THEFT_OF_PRIVATE_INFORMATION', 'Theft of private information', NULL, NULL, NULL, NULL, NULL, NULL), - ('ONLINE_SCAMS', 'Online scams', NULL, NULL, NULL, NULL, NULL, NULL), - ('DESTROY_OR_ABUSE_CRITICAL_INFRASTRUCTURE', 'Destroy or abuse critical infrastructure', NULL, NULL, NULL, NULL, NULL, NULL), - ('THREATEN_NATIONAL_SECURITY', 'Threaten national security', NULL, NULL, NULL, NULL, NULL, NULL), - ('DISRUPT_ECONOMIES', 'Disrupt economies', NULL, NULL, NULL, NULL, NULL, NULL), - ('CAUSE_BODILY_HARM_TO_CITIZENS', 'Cause bodily harm to citizens', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENIAL_OF_SERVICE_ATTACKS', 'Denial-of-Service Attacks', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOXING', 'Doxing', NULL, NULL, NULL, NULL, NULL, NULL), - ('LEAKING_INFORMATION', 'Leaking Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('THE_USE_OF_THE_SOFTWARE_RECAP', 'The Use of the Software RECAP', NULL, NULL, NULL, NULL, NULL, NULL), - ('BLOGGING_ANONYMOUSLY', 'Blogging Anonymously', NULL, NULL, NULL, NULL, NULL, NULL), - ('GEO_BOMBING', 'Geo-bombing', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEBSITE_MIRRORING', 'Website Mirroring', NULL, NULL, NULL, NULL, NULL, NULL), - ('CHANGING_THE_CODE_FOR_WEBSITES_OR_WEBSITE_DEFACEMENTS', 'Changing the Code for Websites or website defacements', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "threat_event_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('VIRUSES', 'Viruses', NULL, NULL, NULL, NULL, NULL, NULL), - ('WORMS', 'Worms', NULL, NULL, NULL, NULL, NULL, NULL), - ('TROJANS', 'Trojans', NULL, NULL, NULL, NULL, NULL, NULL), - ('RANSOMWARE', 'Ransomware', NULL, NULL, NULL, NULL, NULL, NULL), - ('CRYPTOJACKING', 'Cryptojacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPYWARE', 'Spyware', NULL, NULL, NULL, NULL, NULL, NULL), - ('ADWARE', 'Adware', NULL, NULL, NULL, NULL, NULL, NULL), - ('FILELESS_MALWARE', 'Fileless malware', NULL, NULL, NULL, NULL, NULL, NULL), - ('ROOTKITS', 'Rootkits', NULL, NULL, NULL, NULL, NULL, NULL), - ('BAITING', 'Baiting', NULL, NULL, NULL, NULL, NULL, NULL), - ('PRETEXTING', 'Pretexting', NULL, NULL, NULL, NULL, NULL, NULL), - ('PHISHING', 'Phishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('VISHING', 'Vishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('SMISHING', 'Smishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('PIGGYBACKING', 'Piggybacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('TAILGATING', 'Tailgating', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMAIL_HIJACKING', 'Email Hijacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('DNS_SPOOFING', 'DNS spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('IP_SPOOFING', 'IP spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('HTTPS_SPOOFING', 'HTTPS spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('HTTP_FLOOD_DDOS', 'HTTP flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYN_FLOOD_DDOS', 'SYN flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('UDP_FLOOD_DDOS', 'UDP flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('ICMP_FLOOD', 'ICMP flood', NULL, NULL, NULL, NULL, NULL, NULL), - ('NTP_AMPLIFICATION', 'NTP amplification', NULL, NULL, NULL, NULL, NULL, NULL), - ('SQL_INJECTION', 'SQL injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('CODE_INJECTION', 'Code injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('OS_COMMAND_INJECTION', 'OS Command Injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('LDAP_INJECTION', 'LDAP injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('XML_EXTERNAL_ENTITIES_INJECTION', 'XML eXternal Entities (XXE) Injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('CROSS_SITE_SCRIPTING', 'Cross Site Scripting (XSS)', NULL, NULL, NULL, NULL, NULL, NULL), - ('BROKEN_ACCESS_CONTROL', 'Broken Access Control', NULL, NULL, NULL, NULL, NULL, NULL), - ('CRYPTOGRAPHIC_FAILURES', 'Cryptographic Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('INSECURE_DESIGN', 'Insecure Design', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_MISCONFIGURATION', 'Security Misconfiguration', NULL, NULL, NULL, NULL, NULL, NULL), - ('VULNERABLE_AND_OUTDATED_COMPONENTS', 'Vulnerable and Outdated Components', NULL, NULL, NULL, NULL, NULL, NULL), - ('IDENTIFICATION_AND_AUTHENTICATION_FAILURES', 'Identification and Authentication Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_AND_DATA_INTEGRITY_FAILURES', 'Software and Data Integrity Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_LOGGING_AND_MONITORING_FAILURES', 'Security Logging and Monitoring Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVER_SIDE_REQUEST_FORGERY', 'Server Side Request Forgery', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "calendar_period" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('TWENTY_FOUR_HOURS_SEVEN_DAYS', '24x7', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_HOURS', 'Business hours', NULL, NULL, NULL, NULL, NULL, NULL), - ('NON_BUSINESS_HOURS', 'Non-business hours', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "tracking_period" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('DAY', 'Day', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOUR', 'Hour', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONTH', 'Month', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUARTER', 'Quarter', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEEK', 'Week', NULL, NULL, NULL, NULL, NULL, NULL), - ('YEAR', 'Year', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "audit_purpose" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('MEANING_DRY_RUN', 'exmeaning dry runternal', NULL, NULL, NULL, NULL, NULL, NULL), - ('OFFICIAL', 'official', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "audit_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('OUTSTANDING', 'Outstanding', NULL, NULL, NULL, NULL, NULL, NULL), - ('FULFILLED', 'Fulfilled', NULL, NULL, NULL, NULL, NULL, NULL), - ('REJECTED', 'Rejected', NULL, NULL, NULL, NULL, NULL, NULL), - ('ACCEPTED', 'Accepted', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "training_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('HIPAA', 'HIPAA', NULL, NULL, NULL, NULL, NULL, NULL), - ('CYBER_SECURITY', 'Cyber Security', NULL, NULL, NULL, NULL, NULL, NULL), - ('OBSERVABILITY_OPEN_TELEMETRY', 'Observability Open Telemetry', NULL, NULL, NULL, NULL, NULL, NULL), - ('BEST_PRACTICES_OF_AGILE', 'Practices of Agile Workflow', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "status_value" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('YES', 'Yes', NULL, NULL, NULL, NULL, NULL, NULL), - ('NO', 'No', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "rating_value" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ONE', '1', NULL, NULL, NULL, NULL, NULL, NULL), - ('TWO', '2', NULL, NULL, NULL, NULL, NULL, NULL), - ('THREE', '3', NULL, NULL, NULL, NULL, NULL, NULL), - ('FOUR', '4', NULL, NULL, NULL, NULL, NULL, NULL), - ('FIVE', '5', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contract_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('GENERAL_CONTRACT_FOR_SERVICES', 'General Contract for Services', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMPLOYMENT_AGREEMENT', 'Employment Agreement', NULL, NULL, NULL, NULL, NULL, NULL), - ('NONCOMPETE_AGREEMENT', 'Noncompete Agreement', NULL, NULL, NULL, NULL, NULL, NULL), - ('VENDOR_SLA', 'Vendor SLA', NULL, NULL, NULL, NULL, NULL, NULL), - ('VENDOR_NDA', 'Vendor NDA', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "graph_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('SERVICE', 'Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('APP', 'Application', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_risk_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('SECURITY', 'Security', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "risk_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('TECHNICAL_RISK', 'Technical Risk', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "risk_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('BUDGET', 'Budget', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUALITY', 'Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCHEDULE', 'Schedule', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCHEDULE_AND_BUDGET', 'Schedule And Budget', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCESS', 'Access', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA', 'Data', NULL, NULL, NULL, NULL, NULL, NULL), - ('FACILITIES', 'Facilities', NULL, NULL, NULL, NULL, NULL, NULL), - ('FAILURE', 'Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('GENERAL_INFORMATION', 'General Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE', 'Hardware', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOW_TO', 'How To', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE', 'Performance', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY', 'Security', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVICE_DELIVERY', 'Service Delivery', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVICE_PORTFOLIO', 'Service Portfolio', NULL, NULL, NULL, NULL, NULL, NULL), - ('STATUS', 'Status', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUPPORT', 'Support', NULL, NULL, NULL, NULL, NULL, NULL), - ('THRIFTY', 'Thrifty', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_sub_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AUTHORIZATION_ERROR', 'Authorization Error', NULL, NULL, NULL, NULL, NULL, NULL), - ('AVAILABILITY', 'Availability', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_CORRUPTED', 'Data Or File Corrupted', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_INCORRECT', 'Data Or File Incorrect', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_MISSING', 'Data Or File Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('ERROR_MESSAGE', 'Error Message', NULL, NULL, NULL, NULL, NULL, NULL), - ('FUNCTION_OR_FEATURE_NOT_WORKING', 'Function Or Feature Not Working', NULL, NULL, NULL, NULL, NULL, NULL), - ('FUNCTIONALITY', 'Functionality', NULL, NULL, NULL, NULL, NULL, NULL), - ('GENERAL_INFORMATION', 'General Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE_FAILURE', 'Hardware Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOW_TO', 'How To', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT_RESOLUTION_QUALITY', 'Incident Resolution Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT_RESOLUTION_TIME', 'Incident Resolution Time', NULL, NULL, NULL, NULL, NULL, NULL), - ('JOB_FAILED', 'Job Failed', NULL, NULL, NULL, NULL, NULL, NULL), - ('LOGIN_FAILURE', 'Login Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING_OR_STOLEN', 'Missing Or Stolen', NULL, NULL, NULL, NULL, NULL, NULL), - ('NEW_SERVICE', 'New Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE', 'Performance', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE_DEGRADATION', 'Performance Degradation', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERSON', 'Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_BREACH', 'Security Breach', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_EVENT', 'Security Event/Message', NULL, NULL, NULL, NULL, NULL, NULL), - ('STATUS', 'Status', NULL, NULL, NULL, NULL, NULL, NULL), - ('STORAGE_LIMIT_EXCEEDED', 'Storage Limit Exceeded', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYSTEM_DOWN', 'System Down', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYSTEM_OR_APPLICATION_HANGS', 'System Or Application Hangs', NULL, NULL, NULL, NULL, NULL, NULL), - ('UPGRADE_NEW_RELEASE', 'Upgrade/New Release', NULL, NULL, NULL, NULL, NULL, NULL), - ('VIRUS_ALERT', 'Virus Alert', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('COMPLAINT', 'Complaint', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT', 'Incident', NULL, NULL, NULL, NULL, NULL, NULL), - ('REQUEST_FOR_INFORMATION', 'Request For Information', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCEPTED', 'Accepted', NULL, NULL, NULL, NULL, NULL, NULL), - ('ASSIGNED', 'Assigned', NULL, NULL, NULL, NULL, NULL, NULL), - ('CANCELLED', 'Cancelled', NULL, NULL, NULL, NULL, NULL, NULL), - ('CATEGORIZE', 'Categorize', NULL, NULL, NULL, NULL, NULL, NULL), - ('CLOSED', 'Closed', NULL, NULL, NULL, NULL, NULL, NULL), - ('OPEN', 'Open', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_CHANGE', 'Pending Change', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_CUSTOMER', 'Pending Customer', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_EVIDENCE', 'Pending Evidence', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_OTHER', 'Pending Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_VENDOR', 'Pending Vendor', NULL, NULL, NULL, NULL, NULL, NULL), - ('REFERRED', 'Referred', NULL, NULL, NULL, NULL, NULL, NULL), - ('REJECTED', 'Rejected', NULL, NULL, NULL, NULL, NULL, NULL), - ('REOPENED', 'Reopened', NULL, NULL, NULL, NULL, NULL, NULL), - ('REPLACED_PROBLEM', 'Replaced Problem', NULL, NULL, NULL, NULL, NULL, NULL), - ('RESOLVED', 'Resolved', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUSPENDED', 'Suspended', NULL, NULL, NULL, NULL, NULL, NULL), - ('WORK_IN_PROGRESS', 'Work In Progress', NULL, NULL, NULL, NULL, NULL, NULL); ; -- synthetic / test data diff --git a/pattern/infra-assurance/models_test.fixture.sql b/pattern/infra-assurance/models_test.fixture.sql index 047d0fae..0f87e567 100644 --- a/pattern/infra-assurance/models_test.fixture.sql +++ b/pattern/infra-assurance/models_test.fixture.sql @@ -330,7 +330,7 @@ CREATE TABLE IF NOT EXISTS "contact_land" ( FOREIGN KEY("party_id") REFERENCES "party"("party_id") ); CREATE TABLE IF NOT EXISTS "contract_status" ( - "contract_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "contract_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -343,7 +343,7 @@ CREATE TABLE IF NOT EXISTS "contract_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "payment_type" ( - "payment_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "payment_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS "payment_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "periodicity" ( - "periodicity_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "periodicity_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -369,7 +369,7 @@ CREATE TABLE IF NOT EXISTS "periodicity" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "boundary_nature" ( - "boundary_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "boundary_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -382,7 +382,7 @@ CREATE TABLE IF NOT EXISTS "boundary_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "time_entry_category" ( - "time_entry_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "time_entry_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -395,7 +395,7 @@ CREATE TABLE IF NOT EXISTS "time_entry_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "raci_matrix_subject" ( - "raci_matrix_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "raci_matrix_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -408,7 +408,7 @@ CREATE TABLE IF NOT EXISTS "raci_matrix_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "skill_nature" ( - "skill_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "skill_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -421,7 +421,7 @@ CREATE TABLE IF NOT EXISTS "skill_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "skill" ( - "skill_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "skill_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -448,7 +448,7 @@ CREATE TABLE IF NOT EXISTS "organization_role_type" ( ); CREATE TABLE IF NOT EXISTS "graph" ( "graph_id" TEXT PRIMARY KEY NOT NULL, - "graph_nature_id" INTEGER NOT NULL, + "graph_nature_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -464,7 +464,7 @@ CREATE TABLE IF NOT EXISTS "boundary" ( "boundary_id" TEXT PRIMARY KEY NOT NULL, "parent_boundary_id" TEXT, "graph_id" TEXT NOT NULL, - "boundary_nature_id" INTEGER NOT NULL, + "boundary_nature_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -504,7 +504,7 @@ CREATE TABLE IF NOT EXISTS "host_boundary" ( FOREIGN KEY("host_id") REFERENCES "host"("host_id") ); CREATE TABLE IF NOT EXISTS "asset_status" ( - "asset_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -517,7 +517,20 @@ CREATE TABLE IF NOT EXISTS "asset_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_service_status" ( - "asset_service_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_service_status_id" TEXT PRIMARY KEY NOT NULL, + "code" TEXT /* UNIQUE COLUMN */ NOT NULL, + "value" TEXT NOT NULL, + "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, + "created_by" TEXT DEFAULT 'UNKNOWN', + "updated_at" TIMESTAMPTZ, + "updated_by" TEXT, + "deleted_at" TIMESTAMPTZ, + "deleted_by" TEXT, + "activity_log" TEXT, + UNIQUE("code") +); +CREATE TABLE IF NOT EXISTS "asset_service_type" ( + "asset_service_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -530,7 +543,7 @@ CREATE TABLE IF NOT EXISTS "asset_service_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_type" ( - "asset_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -543,7 +556,7 @@ CREATE TABLE IF NOT EXISTS "asset_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "assignment" ( - "assignment_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "assignment_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -573,7 +586,7 @@ CREATE TABLE IF NOT EXISTS "raci_matrix" ( CREATE TABLE IF NOT EXISTS "raci_matrix_subject_boundary" ( "raci_matrix_subject_boundary_id" TEXT PRIMARY KEY NOT NULL, "boundary_id" TEXT NOT NULL, - "raci_matrix_subject_id" INTEGER NOT NULL, + "raci_matrix_subject_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', "updated_at" TIMESTAMPTZ, @@ -600,13 +613,13 @@ CREATE TABLE IF NOT EXISTS "asset" ( "organization_id" TEXT NOT NULL, "boundary_id" TEXT, "asset_retired_date" DATE, - "asset_status_id" INTEGER NOT NULL, + "asset_status_id" TEXT NOT NULL, "asset_tag" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT NOT NULL, - "asset_type_id" INTEGER NOT NULL, + "asset_type_id" TEXT NOT NULL, "asset_workload_category" TEXT NOT NULL, - "assignment_id" INTEGER NOT NULL, + "assignment_id" TEXT NOT NULL, "barcode_or_rfid_tag" TEXT NOT NULL, "installed_date" DATE, "planned_retirement_date" DATE, @@ -636,9 +649,10 @@ CREATE TABLE IF NOT EXISTS "asset" ( CREATE TABLE IF NOT EXISTS "asset_service" ( "asset_service_id" TEXT PRIMARY KEY NOT NULL, "asset_id" TEXT NOT NULL, + "asset_service_type_id" TEXT NOT NULL, "name" TEXT NOT NULL, "description" TEXT NOT NULL, - "asset_service_status_id" INTEGER NOT NULL, + "asset_service_status_id" TEXT NOT NULL, "port" TEXT NOT NULL, "experimental_version" TEXT NOT NULL, "production_version" TEXT NOT NULL, @@ -657,6 +671,7 @@ CREATE TABLE IF NOT EXISTS "asset_service" ( "deleted_by" TEXT, "activity_log" TEXT, FOREIGN KEY("asset_id") REFERENCES "asset"("asset_id"), + FOREIGN KEY("asset_service_type_id") REFERENCES "asset_service_type"("asset_service_type_id"), FOREIGN KEY("asset_service_status_id") REFERENCES "asset_service_status"("asset_service_status_id") ); CREATE TABLE IF NOT EXISTS "vulnerability_source" ( @@ -698,7 +713,7 @@ CREATE TABLE IF NOT EXISTS "threat_source" ( "threat_source_id" TEXT PRIMARY KEY NOT NULL, "title" TEXT NOT NULL, "identifier" TEXT NOT NULL, - "threat_source_type_id" INTEGER NOT NULL, + "threat_source_type_id" TEXT NOT NULL, "source_of_information" TEXT NOT NULL, "capability" TEXT NOT NULL, "intent" TEXT NOT NULL, @@ -719,7 +734,7 @@ CREATE TABLE IF NOT EXISTS "threat_event" ( "threat_source_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, "identifier" TEXT NOT NULL, - "threat_event_type_id" INTEGER NOT NULL, + "threat_event_type_id" TEXT NOT NULL, "event_classification" TEXT NOT NULL, "source_of_information" TEXT NOT NULL, "description" TEXT NOT NULL, @@ -736,7 +751,7 @@ CREATE TABLE IF NOT EXISTS "threat_event" ( ); CREATE TABLE IF NOT EXISTS "asset_risk" ( "asset_risk_id" TEXT PRIMARY KEY NOT NULL, - "asset_risk_type_id" INTEGER NOT NULL, + "asset_risk_type_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, "threat_event_id" TEXT NOT NULL, "relevance_id" TEXT, @@ -841,9 +856,9 @@ CREATE TABLE IF NOT EXISTS "scheduled_task" ( CREATE TABLE IF NOT EXISTS "timesheet" ( "timesheet_id" TEXT PRIMARY KEY NOT NULL, "date_of_work" TIMESTAMPTZ NOT NULL, - "is_billable_id" INTEGER NOT NULL, + "is_billable_id" TEXT NOT NULL, "number_of_hours" INTEGER NOT NULL, - "time_entry_category_id" INTEGER NOT NULL, + "time_entry_category_id" TEXT NOT NULL, "timesheet_summary" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -897,10 +912,10 @@ CREATE TABLE IF NOT EXISTS "device" ( ); CREATE TABLE IF NOT EXISTS "security_incident_response_team" ( "security_incident_response_team_id" TEXT PRIMARY KEY NOT NULL, - "training_subject_id" INTEGER, + "training_subject_id" TEXT, "person_id" TEXT NOT NULL, "organization_id" TEXT NOT NULL, - "training_status_id" INTEGER, + "training_status_id" TEXT, "attended_date" DATE, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -916,10 +931,10 @@ CREATE TABLE IF NOT EXISTS "security_incident_response_team" ( ); CREATE TABLE IF NOT EXISTS "awareness_training" ( "awareness_training_id" TEXT PRIMARY KEY NOT NULL, - "training_subject_id" INTEGER NOT NULL, + "training_subject_id" TEXT NOT NULL, "person_id" TEXT NOT NULL, "organization_id" TEXT NOT NULL, - "training_status_id" INTEGER NOT NULL, + "training_status_id" TEXT NOT NULL, "attended_date" DATE NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -937,11 +952,11 @@ CREATE TABLE IF NOT EXISTS "rating" ( "rating_id" TEXT PRIMARY KEY NOT NULL, "author_id" TEXT NOT NULL, "rating_given_to_id" TEXT NOT NULL, - "rating_value_id" INTEGER NOT NULL, - "best_rating_id" INTEGER, + "rating_value_id" TEXT NOT NULL, + "best_rating_id" TEXT, "rating_explanation" TEXT NOT NULL, "review_aspect" TEXT NOT NULL, - "worst_rating_id" INTEGER, + "worst_rating_id" TEXT, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', "updated_at" TIMESTAMPTZ, @@ -969,7 +984,7 @@ CREATE TABLE IF NOT EXISTS "note" ( FOREIGN KEY("party_id") REFERENCES "party"("party_id") ); CREATE TABLE IF NOT EXISTS "threat_source_type" ( - "threat_source_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "threat_source_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -982,7 +997,7 @@ CREATE TABLE IF NOT EXISTS "threat_source_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "threat_event_type" ( - "threat_event_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "threat_event_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -995,7 +1010,7 @@ CREATE TABLE IF NOT EXISTS "threat_event_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "calendar_period" ( - "calendar_period_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "calendar_period_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1008,7 +1023,7 @@ CREATE TABLE IF NOT EXISTS "calendar_period" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "tracking_period" ( - "tracking_period_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "tracking_period_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1023,10 +1038,10 @@ CREATE TABLE IF NOT EXISTS "tracking_period" ( CREATE TABLE IF NOT EXISTS "audit_assertion" ( "audit_assertion_id" TEXT PRIMARY KEY NOT NULL, "auditor_type_id" TEXT NOT NULL, - "audit_purpose_id" INTEGER NOT NULL, + "audit_purpose_id" TEXT NOT NULL, "auditor_org_id" TEXT NOT NULL, "auditor_person_id" TEXT NOT NULL, - "auditor_status_type_id" INTEGER NOT NULL, + "auditor_status_type_id" TEXT NOT NULL, "scf_identifier" TEXT NOT NULL, "auditor_notes" TEXT NOT NULL, "auditor_artifacts" TEXT NOT NULL, @@ -1049,13 +1064,13 @@ CREATE TABLE IF NOT EXISTS "contract" ( "contract_id" TEXT PRIMARY KEY NOT NULL, "contract_from_id" TEXT NOT NULL, "contract_to_id" TEXT NOT NULL, - "contract_status_id" INTEGER, + "contract_status_id" TEXT, "document_reference" TEXT NOT NULL, - "payment_type_id" INTEGER, - "periodicity_id" INTEGER, + "payment_type_id" TEXT, + "periodicity_id" TEXT, "start_date" TIMESTAMPTZ NOT NULL, "end_date" TIMESTAMPTZ, - "contract_type_id" INTEGER, + "contract_type_id" TEXT, "date_of_last_review" TIMESTAMPTZ, "date_of_next_review" TIMESTAMPTZ, "date_of_contract_review" TIMESTAMPTZ, @@ -1077,15 +1092,15 @@ CREATE TABLE IF NOT EXISTS "contract" ( CREATE TABLE IF NOT EXISTS "risk_register" ( "risk_register_id" TEXT PRIMARY KEY NOT NULL, "description" TEXT NOT NULL, - "risk_subject_id" INTEGER NOT NULL, - "risk_type_id" INTEGER NOT NULL, + "risk_subject_id" TEXT NOT NULL, + "risk_type_id" TEXT NOT NULL, "impact_to_the_organization" TEXT NOT NULL, - "rating_likelihood_id" INTEGER, - "rating_impact_id" INTEGER, - "rating_overall_risk_id" INTEGER, + "rating_likelihood_id" TEXT, + "rating_impact_id" TEXT, + "rating_overall_risk_id" TEXT, "controls_in_place" TEXT NOT NULL, "control_effectivenes" INTEGER NOT NULL, - "over_all_residual_risk_rating_id" INTEGER, + "over_all_residual_risk_rating_id" TEXT, "mitigation_further_actions" TEXT NOT NULL, "control_monitor_mitigation_actions_tracking_strategy" TEXT NOT NULL, "control_monitor_action_due_date" DATE, @@ -1111,11 +1126,11 @@ CREATE TABLE IF NOT EXISTS "incident" ( "incident_date" DATE NOT NULL, "time_and_time_zone" TIMESTAMPTZ NOT NULL, "asset_id" TEXT NOT NULL, - "category_id" INTEGER NOT NULL, - "sub_category_id" INTEGER NOT NULL, + "category_id" TEXT NOT NULL, + "sub_category_id" TEXT NOT NULL, "severity_id" TEXT NOT NULL, "priority_id" TEXT, - "internal_or_external_id" INTEGER, + "internal_or_external_id" TEXT, "location" TEXT NOT NULL, "it_service_impacted" TEXT NOT NULL, "impacted_modules" TEXT NOT NULL, @@ -1131,7 +1146,7 @@ CREATE TABLE IF NOT EXISTS "incident" ( "eradication_details" TEXT NOT NULL, "business_impact" TEXT NOT NULL, "lessons_learned" TEXT NOT NULL, - "status_id" INTEGER, + "status_id" TEXT, "closed_date" DATE, "reopened_time" TIMESTAMPTZ, "feedback_from_business" TEXT NOT NULL, @@ -1182,7 +1197,7 @@ CREATE TABLE IF NOT EXISTS "incident_root_cause" ( CREATE TABLE IF NOT EXISTS "raci_matrix_assignment" ( "raci_matrix_assignment_id" TEXT PRIMARY KEY NOT NULL, "person_id" TEXT NOT NULL, - "subject_id" INTEGER NOT NULL, + "subject_id" TEXT NOT NULL, "activity_id" TEXT NOT NULL, "raci_matrix_assignment_nature_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1200,8 +1215,8 @@ CREATE TABLE IF NOT EXISTS "raci_matrix_assignment" ( CREATE TABLE IF NOT EXISTS "person_skill" ( "person_skill_id" TEXT PRIMARY KEY NOT NULL, "person_id" TEXT NOT NULL, - "skill_nature_id" INTEGER NOT NULL, - "skill_id" INTEGER NOT NULL, + "skill_nature_id" TEXT NOT NULL, + "skill_id" TEXT NOT NULL, "proficiency_scale_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -1231,7 +1246,7 @@ CREATE TABLE IF NOT EXISTS "key_performance_indicator" ( "key_performance_indicator_id" TEXT PRIMARY KEY NOT NULL, "key_performance_id" TEXT NOT NULL, "asset_id" TEXT NOT NULL, - "calendar_period_id" INTEGER NOT NULL, + "calendar_period_id" TEXT NOT NULL, "kpi_comparison_operator_id" TEXT NOT NULL, "kpi_context" TEXT NOT NULL, "kpi_lower_threshold_critical" TEXT NOT NULL, @@ -1249,7 +1264,7 @@ CREATE TABLE IF NOT EXISTS "key_performance_indicator" ( "kpi_unit_of_measure" TEXT NOT NULL, "kpi_value" TEXT NOT NULL, "score" TEXT NOT NULL, - "tracking_period_id" INTEGER NOT NULL, + "tracking_period_id" TEXT NOT NULL, "trend_id" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, "created_by" TEXT DEFAULT 'UNKNOWN', @@ -1347,7 +1362,7 @@ CREATE TABLE IF NOT EXISTS "attestation_evidence" ( FOREIGN KEY("attestation_id") REFERENCES "attestation"("attestation_id") ); CREATE TABLE IF NOT EXISTS "training_subject" ( - "training_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "training_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1360,7 +1375,7 @@ CREATE TABLE IF NOT EXISTS "training_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "status_value" ( - "status_value_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "status_value_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1373,7 +1388,7 @@ CREATE TABLE IF NOT EXISTS "status_value" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "rating_value" ( - "rating_value_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "rating_value_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1386,7 +1401,7 @@ CREATE TABLE IF NOT EXISTS "rating_value" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "contract_type" ( - "contract_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "contract_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1399,7 +1414,7 @@ CREATE TABLE IF NOT EXISTS "contract_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "graph_nature" ( - "graph_nature_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "graph_nature_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1412,7 +1427,7 @@ CREATE TABLE IF NOT EXISTS "graph_nature" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "risk_subject" ( - "risk_subject_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "risk_subject_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1425,7 +1440,7 @@ CREATE TABLE IF NOT EXISTS "risk_subject" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "risk_type" ( - "risk_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "risk_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1438,7 +1453,7 @@ CREATE TABLE IF NOT EXISTS "risk_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_category" ( - "incident_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1451,7 +1466,7 @@ CREATE TABLE IF NOT EXISTS "incident_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_sub_category" ( - "incident_sub_category_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_sub_category_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1464,7 +1479,7 @@ CREATE TABLE IF NOT EXISTS "incident_sub_category" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_type" ( - "incident_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1477,7 +1492,7 @@ CREATE TABLE IF NOT EXISTS "incident_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "incident_status" ( - "incident_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "incident_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1490,7 +1505,7 @@ CREATE TABLE IF NOT EXISTS "incident_status" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "asset_risk_type" ( - "asset_risk_type_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "asset_risk_type_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1503,7 +1518,7 @@ CREATE TABLE IF NOT EXISTS "asset_risk_type" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "audit_purpose" ( - "audit_purpose_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "audit_purpose_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1516,7 +1531,7 @@ CREATE TABLE IF NOT EXISTS "audit_purpose" ( UNIQUE("code") ); CREATE TABLE IF NOT EXISTS "audit_status" ( - "audit_status_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "audit_status_id" TEXT PRIMARY KEY NOT NULL, "code" TEXT /* UNIQUE COLUMN */ NOT NULL, "value" TEXT NOT NULL, "created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, @@ -1703,9 +1718,9 @@ CREATE VIEW IF NOT EXISTS "contract_view"("contract_by", "contract_to", "payment INNER JOIN contract_status cs on cs.code = ct.contract_status_id INNER JOIN contract_type ctp on ctp.code = ct.contract_type_id INNER JOIN periodicity p on p.code = ct.periodicity_id; -CREATE VIEW IF NOT EXISTS "asset_service_view"("name", "server", "boundary", "description", "port", "experimental_version", "production_version", "latest_vendor_version", "resource_utilization", "log_file", "url", "vendor_link", "installation_date", "criticality", "owner", "tag", "asset_criticality", "asymmetric_keys", "cryptographic_key", "symmetric_keys") AS +CREATE VIEW IF NOT EXISTS "asset_service_view"("name", "server", "organization_id", "boundary", "description", "port", "experimental_version", "production_version", "latest_vendor_version", "resource_utilization", "log_file", "url", "vendor_link", "installation_date", "criticality", "owner", "tag", "asset_criticality", "asymmetric_keys", "cryptographic_key", "symmetric_keys") AS SELECT - asser.name,ast.name as server,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, + asser.name,ast.name as server,ast.organization_id,bnt.name as boundary,asser.description,asser.port,asser.experimental_version,asser.production_version,asser.latest_vendor_version,asser.resource_utilization,asser.log_file,asser.url, asser.vendor_link,asser.installation_date,asser.criticality,o.name AS owner,sta.value as tag, ast.criticality as asset_criticality,ast.asymmetric_keys_encryption_enabled as asymmetric_keys, ast.cryptographic_key_encryption_enabled as cryptographic_key,ast.symmetric_keys_encryption_enabled as symmetric_keys FROM asset_service asser @@ -1788,412 +1803,6 @@ INSERT INTO "severity" ("code", "value") VALUES ('LOW', 'Low'); INSERT INTO "priority" ("code", "value") VALUES ('HIGH', 'High'); INSERT INTO "priority" ("code", "value") VALUES ('MEDIUM', 'Medium'); INSERT INTO "priority" ("code", "value") VALUES ('LOW', 'Low'); - -INSERT INTO "party_role" ("party_role_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('1', 'VENDOR', 'Vendor', NULL, NULL, NULL, NULL, NULL, NULL), - ('2', 'CUSTOMER', 'Customer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_identifier_type" ("party_identifier_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('3', 'PASSPORT', 'Passport', NULL, NULL, NULL, NULL, NULL, NULL), - ('4', 'UUID', 'UUID', NULL, NULL, NULL, NULL, NULL, NULL), - ('5', 'DRIVING_LICENSE', 'Driving License', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_type" ("party_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('31', 'PERSON', 'Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('32', 'ORGANIZATION', 'Organization', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "sex_type" ("sex_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('33', 'MALE', 'Male', NULL, NULL, NULL, NULL, NULL, NULL), - ('34', 'FEMALE', 'Female', NULL, NULL, NULL, NULL, NULL, NULL), - ('35', 'INTERSEX', 'Intersex', NULL, NULL, NULL, NULL, NULL, NULL), - ('36', 'X', 'X', NULL, NULL, NULL, NULL, NULL, NULL), - ('37', 'NOT_LISTED_PLEASE_DESCRIBE', 'Not listed, please describe', NULL, NULL, NULL, NULL, NULL, NULL), - ('38', 'UNKNOWN', 'Unknown', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "gender_type" ("gender_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('39', 'MALE', 'Male', NULL, NULL, NULL, NULL, NULL, NULL), - ('40', 'FEMALE', 'Female', NULL, NULL, NULL, NULL, NULL, NULL), - ('41', 'OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('42', 'NONBINARY', 'Nonbinary', NULL, NULL, NULL, NULL, NULL, NULL), - ('43', 'AGENDER', 'Agender', NULL, NULL, NULL, NULL, NULL, NULL), - ('44', 'TRANGENDER', 'Transgender', NULL, NULL, NULL, NULL, NULL, NULL), - ('45', 'CISGENDER', 'Cisgender', NULL, NULL, NULL, NULL, NULL, NULL), - ('46', 'GENDERQUEER', 'Genderqueer', NULL, NULL, NULL, NULL, NULL, NULL), - ('47', 'PREFER_NOT_TO_ANSWER', 'Prefer not to answer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "party_relation_type" ("party_relation_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('48', 'PERSON_TO_PERSON', 'Person To Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('49', 'ORGANIZATION_TO_PERSON', 'Organization To Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('50', 'ORGANIZATION_TO_ORGANIZATION', 'Organization To Organization', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "person_type" ("person_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('6', 'INDIVIDUAL', 'Individual', NULL, NULL, NULL, NULL, NULL, NULL), - ('7', 'PROFESSIONAL', 'Professional', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contact_type" ("contact_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('8', 'HOME_ADDRESS', 'Home Address', NULL, NULL, NULL, NULL, NULL, NULL), - ('9', 'OFFICIAL_ADDRESS', 'Official Address', NULL, NULL, NULL, NULL, NULL, NULL), - ('10', 'MOBILE_PHONE_NUMBER', 'Mobile Phone Number', NULL, NULL, NULL, NULL, NULL, NULL), - ('11', 'LAND_PHONE_NUMBER', 'Land Phone Number', NULL, NULL, NULL, NULL, NULL, NULL), - ('12', 'OFFICIAL_EMAIL', 'Official Email', NULL, NULL, NULL, NULL, NULL, NULL), - ('13', 'PERSONAL_EMAIL', 'Personal Email', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "organization_role_type" ("organization_role_type_id", "code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('14', 'PROJECT_MANAGER_TECHNOLOGY', 'Project Manager Technology', NULL, NULL, NULL, NULL, NULL, NULL), - ('15', 'PROJECT_MANAGER_QUALITY', 'Project Manager Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('16', 'PROJECT_MANAGER_DEVOPS', 'Project Manager DevOps', NULL, NULL, NULL, NULL, NULL, NULL), - ('17', 'ASSOCIATE_MANAGER_TECHNOLOGY', 'Associated Manager Technology', NULL, NULL, NULL, NULL, NULL, NULL), - ('18', 'ASSOCIATE_MANAGER_QUALITY', 'Associate Manager Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('19', 'ASSOCIATE_MANAGER_DEVOPS', 'Associate Manager DevOps', NULL, NULL, NULL, NULL, NULL, NULL), - ('20', 'SENIOR_LEAD_SOFTWARE_ENGINEER_ARCHITECT', 'Senior Lead Software Engineer Architect', NULL, NULL, NULL, NULL, NULL, NULL), - ('21', 'LEAD_SOFTWARE_ENGINEER_ARCHITECT', 'Lead Software Engineer Architect', NULL, NULL, NULL, NULL, NULL, NULL), - ('22', 'SENIOR_LEAD_SOFTWARE_QUALITY_ENGINEER', 'Senior Lead Software DevOps Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('23', 'LEAD_SOFTWARE_ENGINEER', 'Lead Software Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('24', 'LEAD_SOFTWARE_QUALITY_ENGINEER', 'Lead Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('25', 'LEAD_SOFTWARE_DEVOPS_ENGINEER', 'Lead Software DevOps Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('26', 'LEAD_SYSTEM_NETWORK_ENGINEER', 'Lead System Network Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('27', 'SENIOR_SOFTWARE_ENGINEER', 'Senior Software Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('28', 'SENIOR_SOFTWARE_QUALITY_ENGINEER', 'Senior Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('29', 'SOFTWARE_QUALITY_ENGINEER', 'Software Quality Engineer', NULL, NULL, NULL, NULL, NULL, NULL), - ('30', 'SECURITY_ENGINEER', 'Security Engineer', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contract_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACTIVE', 'Active', NULL, NULL, NULL, NULL, NULL, NULL), - ('AWAITING_APPROVAL', 'Awaiting Approval', NULL, NULL, NULL, NULL, NULL, NULL), - ('AWAITING_APPROVAL_FOR_RENEWAL', 'Awaiting Approval For Renewal', NULL, NULL, NULL, NULL, NULL, NULL), - ('CANCELED', 'Canceled', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENIED', 'Denied', NULL, NULL, NULL, NULL, NULL, NULL), - ('FINISHED', 'Finished', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_PREPARATION', 'In Preparation', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUOTE_REQUESTED', 'Quote Requested', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUOTED', 'Quoted', NULL, NULL, NULL, NULL, NULL, NULL), - ('STANDARD_CONTRACT', 'Standard Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUSPENDED', 'Suspended', NULL, NULL, NULL, NULL, NULL, NULL), - ('VALIDATED', 'Validated', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "payment_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('BOTH', 'Both', NULL, NULL, NULL, NULL, NULL, NULL), - ('LOANS', 'Loans', NULL, NULL, NULL, NULL, NULL, NULL), - ('NONE', 'None', NULL, NULL, NULL, NULL, NULL, NULL), - ('RENTS', 'Rents', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "periodicity" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ANNUAL', 'Annual', NULL, NULL, NULL, NULL, NULL, NULL), - ('BI_MONTHLY', 'Bi Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('BI_WEEKLY', 'Bi Weekly', NULL, NULL, NULL, NULL, NULL, NULL), - ('DAILY', 'Daily', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONTHLY', 'Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUARTERLY', 'Quarterly', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEMI_ANNUAL', 'Semi Annual', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEMI_MONTHLY', 'Semi Monthly', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEEKLY', 'Weekly', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "boundary_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('REGULATORY_TAX_ID', 'Regulatory Tax ID', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "time_entry_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('MISC_MEETINGS', 'Misc Meetings', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_OTHER', 'Misc Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_VACATION', 'Misc Vacation', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISC_WORK_ITEM', 'Misc Work Item', NULL, NULL, NULL, NULL, NULL, NULL), - ('PACKAGE', 'Package', NULL, NULL, NULL, NULL, NULL, NULL), - ('PROJECT', 'Project', NULL, NULL, NULL, NULL, NULL, NULL), - ('REQUEST', 'Request', NULL, NULL, NULL, NULL, NULL, NULL), - ('TASK', 'Task', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "raci_matrix_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('PROJECT_LEADERSHIP', 'Project Leadership', NULL, NULL, NULL, NULL, NULL, NULL), - ('PROJECT_MANAGEMENT', 'Project Management', NULL, NULL, NULL, NULL, NULL, NULL), - ('APPLICATION_DEVELOPMENT', 'Application Development', NULL, NULL, NULL, NULL, NULL, NULL), - ('DEV_OPERATIONS', 'Dev Operations', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUALITY_ASSURANCE', 'Quality Assurance', NULL, NULL, NULL, NULL, NULL, NULL), - ('SEARCH_ENGINE_OPTIMIZATION', 'Search Engine Optimization', NULL, NULL, NULL, NULL, NULL, NULL), - ('USER_INTERFASE_USABILITY', 'User Interfase And Usability', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_ANALYST', 'Business Analyst (Abm)', NULL, NULL, NULL, NULL, NULL, NULL), - ('CURATION_COORDINATION', 'Curation Coordination', NULL, NULL, NULL, NULL, NULL, NULL), - ('KNOWLEDGE_REPRESENTATION', 'Knowledge Representation', NULL, NULL, NULL, NULL, NULL, NULL), - ('MARKETING_OUTREACH', 'Marketing Outreach', NULL, NULL, NULL, NULL, NULL, NULL), - ('CURATION_WORKS', 'Curation Works', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "skill_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('SOFTWARE', 'Software', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE', 'Hardware', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "skill" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ANGULAR', 'Angular', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENO', 'Deno', NULL, NULL, NULL, NULL, NULL, NULL), - ('TYPESCRIPT', 'Typescript', NULL, NULL, NULL, NULL, NULL, NULL), - ('POSTGRESQL', 'PostgreSQL', NULL, NULL, NULL, NULL, NULL, NULL), - ('MYSQL', 'MySQL', NULL, NULL, NULL, NULL, NULL, NULL), - ('HUGO', 'Hugo', NULL, NULL, NULL, NULL, NULL, NULL), - ('PHP', 'PHP', NULL, NULL, NULL, NULL, NULL, NULL), - ('JAVASCRIPT', 'JavaScript', NULL, NULL, NULL, NULL, NULL, NULL), - ('PYTHON', 'Python', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOT_NET', '.NET', NULL, NULL, NULL, NULL, NULL, NULL), - ('ORACLE', 'Oracle', NULL, NULL, NULL, NULL, NULL, NULL), - ('JAVA', 'Java', NULL, NULL, NULL, NULL, NULL, NULL), - ('JQUERY', 'jQuery', NULL, NULL, NULL, NULL, NULL, NULL), - ('OSQUERY', 'Osquery', NULL, NULL, NULL, NULL, NULL, NULL), - ('REACTJS', 'ReactJs', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AWAITING_RECEIPT', 'Awaiting Receipt', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_STOCK', 'In Stock', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_USE', 'In Use', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING', 'Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETIRED', 'Retired', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_FOR_MAINTENANCE', 'Returned For Maintenance', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_TO_SUPPLIER', 'Returned To Supplier', NULL, NULL, NULL, NULL, NULL, NULL), - ('UNDEFINED', 'Undefined', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_service_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACTIVE', 'Active', NULL, NULL, NULL, NULL, NULL, NULL), - ('INACTIVE', 'Inactive', NULL, NULL, NULL, NULL, NULL, NULL), - ('DELETED', 'DELETED', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCOUNT', 'Account', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_SERVICE', 'Business Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('CABLE', 'Cable', NULL, NULL, NULL, NULL, NULL, NULL), - ('CABLE_DEVICE', 'Cable Device', NULL, NULL, NULL, NULL, NULL, NULL), - ('COLLECTIVE_EQUIPMENT', 'Collective Equipment', NULL, NULL, NULL, NULL, NULL, NULL), - ('COMPUTER', 'Computer', NULL, NULL, NULL, NULL, NULL, NULL), - ('CPU', 'Cpu', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOMAIN', 'Domain', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVER', 'Server', NULL, NULL, NULL, NULL, NULL, NULL), - ('EXTENSION_CARD', 'Extension Card', NULL, NULL, NULL, NULL, NULL, NULL), - ('GLOBAL_SOFTWARE_LICENSE', 'Global Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('LAPTOP', 'Laptop', NULL, NULL, NULL, NULL, NULL, NULL), - ('LASER_PRINTER', 'Laser Printer', NULL, NULL, NULL, NULL, NULL, NULL), - ('LICENSE_CONTRACT', 'License Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('MAINTENANCE_CONTRACT', 'Maintenance Contract', NULL, NULL, NULL, NULL, NULL, NULL), - ('MASS_STORAGE', 'Mass Storage', NULL, NULL, NULL, NULL, NULL, NULL), - ('MOBILE_DEVICE', 'Mobile Device', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONITOR', 'Monitor', NULL, NULL, NULL, NULL, NULL, NULL), - ('NETWORK_HARDWARE', 'Network Hardware', NULL, NULL, NULL, NULL, NULL, NULL), - ('NETWORK_INTERFACE', 'Network Interface', NULL, NULL, NULL, NULL, NULL, NULL), - ('OEM_SOFTWARE_LICENSE', 'Oem Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('PRINTER', 'Printer', NULL, NULL, NULL, NULL, NULL, NULL), - ('RACKMOUNT_MONITOR', 'Rackmount Monitor', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCANNER', 'Scanner', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ACCESS_AUTHORIZATION', 'Software Access Authorization', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ACCESS_REMOVAL', 'Software Access Removal', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_ADD_WORK_ORDER', 'Software Add Work Order', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_INSTALLATION', 'Software Installation', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_LICENSE', 'Software License', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_REMOVAL_WORK_ORDER', 'Software Removal Work Order', NULL, NULL, NULL, NULL, NULL, NULL), - ('STANDARD_ASSET', 'Standard Asset', NULL, NULL, NULL, NULL, NULL, NULL), - ('TELECOMMUNICATION_EQUIPMENT', 'Telecommunication Equipment', NULL, NULL, NULL, NULL, NULL, NULL), - ('TELEPHONE', 'Telephone', NULL, NULL, NULL, NULL, NULL, NULL), - ('VIRTUAL_MACHINE', 'Virtual Machine', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_POLICY', 'Security Policy', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMPLOYEE_DATA', 'Employee Data', NULL, NULL, NULL, NULL, NULL, NULL), - ('API', 'Api', NULL, NULL, NULL, NULL, NULL, NULL), - ('FIREWALL', 'Firewall', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "assignment" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AWAITING_RECEIPT', 'Awaiting receipt', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_STOCK', 'In Stock', NULL, NULL, NULL, NULL, NULL, NULL), - ('IN_USE', 'In Use', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING', 'Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_FOR_MAINTENANCE', 'Returned For Maintenance', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETURNED_TO_SUPPLIER', 'Returned To Supplier', NULL, NULL, NULL, NULL, NULL, NULL), - ('RETIRED', 'Retired', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "threat_source_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('PHISHING', 'Phishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPAM', 'Spam', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPYWARE_AND_MALWARE_FOR_EXTORTION', 'Spyware and malware for extortion', NULL, NULL, NULL, NULL, NULL, NULL), - ('THEFT_OF_PRIVATE_INFORMATION', 'Theft of private information', NULL, NULL, NULL, NULL, NULL, NULL), - ('ONLINE_SCAMS', 'Online scams', NULL, NULL, NULL, NULL, NULL, NULL), - ('DESTROY_OR_ABUSE_CRITICAL_INFRASTRUCTURE', 'Destroy or abuse critical infrastructure', NULL, NULL, NULL, NULL, NULL, NULL), - ('THREATEN_NATIONAL_SECURITY', 'Threaten national security', NULL, NULL, NULL, NULL, NULL, NULL), - ('DISRUPT_ECONOMIES', 'Disrupt economies', NULL, NULL, NULL, NULL, NULL, NULL), - ('CAUSE_BODILY_HARM_TO_CITIZENS', 'Cause bodily harm to citizens', NULL, NULL, NULL, NULL, NULL, NULL), - ('DENIAL_OF_SERVICE_ATTACKS', 'Denial-of-Service Attacks', NULL, NULL, NULL, NULL, NULL, NULL), - ('DOXING', 'Doxing', NULL, NULL, NULL, NULL, NULL, NULL), - ('LEAKING_INFORMATION', 'Leaking Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('THE_USE_OF_THE_SOFTWARE_RECAP', 'The Use of the Software RECAP', NULL, NULL, NULL, NULL, NULL, NULL), - ('BLOGGING_ANONYMOUSLY', 'Blogging Anonymously', NULL, NULL, NULL, NULL, NULL, NULL), - ('GEO_BOMBING', 'Geo-bombing', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEBSITE_MIRRORING', 'Website Mirroring', NULL, NULL, NULL, NULL, NULL, NULL), - ('CHANGING_THE_CODE_FOR_WEBSITES_OR_WEBSITE_DEFACEMENTS', 'Changing the Code for Websites or website defacements', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "threat_event_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('VIRUSES', 'Viruses', NULL, NULL, NULL, NULL, NULL, NULL), - ('WORMS', 'Worms', NULL, NULL, NULL, NULL, NULL, NULL), - ('TROJANS', 'Trojans', NULL, NULL, NULL, NULL, NULL, NULL), - ('RANSOMWARE', 'Ransomware', NULL, NULL, NULL, NULL, NULL, NULL), - ('CRYPTOJACKING', 'Cryptojacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('SPYWARE', 'Spyware', NULL, NULL, NULL, NULL, NULL, NULL), - ('ADWARE', 'Adware', NULL, NULL, NULL, NULL, NULL, NULL), - ('FILELESS_MALWARE', 'Fileless malware', NULL, NULL, NULL, NULL, NULL, NULL), - ('ROOTKITS', 'Rootkits', NULL, NULL, NULL, NULL, NULL, NULL), - ('BAITING', 'Baiting', NULL, NULL, NULL, NULL, NULL, NULL), - ('PRETEXTING', 'Pretexting', NULL, NULL, NULL, NULL, NULL, NULL), - ('PHISHING', 'Phishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('VISHING', 'Vishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('SMISHING', 'Smishing', NULL, NULL, NULL, NULL, NULL, NULL), - ('PIGGYBACKING', 'Piggybacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('TAILGATING', 'Tailgating', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMAIL_HIJACKING', 'Email Hijacking', NULL, NULL, NULL, NULL, NULL, NULL), - ('DNS_SPOOFING', 'DNS spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('IP_SPOOFING', 'IP spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('HTTPS_SPOOFING', 'HTTPS spoofing', NULL, NULL, NULL, NULL, NULL, NULL), - ('HTTP_FLOOD_DDOS', 'HTTP flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYN_FLOOD_DDOS', 'SYN flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('UDP_FLOOD_DDOS', 'UDP flood DDoS', NULL, NULL, NULL, NULL, NULL, NULL), - ('ICMP_FLOOD', 'ICMP flood', NULL, NULL, NULL, NULL, NULL, NULL), - ('NTP_AMPLIFICATION', 'NTP amplification', NULL, NULL, NULL, NULL, NULL, NULL), - ('SQL_INJECTION', 'SQL injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('CODE_INJECTION', 'Code injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('OS_COMMAND_INJECTION', 'OS Command Injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('LDAP_INJECTION', 'LDAP injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('XML_EXTERNAL_ENTITIES_INJECTION', 'XML eXternal Entities (XXE) Injection', NULL, NULL, NULL, NULL, NULL, NULL), - ('CROSS_SITE_SCRIPTING', 'Cross Site Scripting (XSS)', NULL, NULL, NULL, NULL, NULL, NULL), - ('BROKEN_ACCESS_CONTROL', 'Broken Access Control', NULL, NULL, NULL, NULL, NULL, NULL), - ('CRYPTOGRAPHIC_FAILURES', 'Cryptographic Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('INSECURE_DESIGN', 'Insecure Design', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_MISCONFIGURATION', 'Security Misconfiguration', NULL, NULL, NULL, NULL, NULL, NULL), - ('VULNERABLE_AND_OUTDATED_COMPONENTS', 'Vulnerable and Outdated Components', NULL, NULL, NULL, NULL, NULL, NULL), - ('IDENTIFICATION_AND_AUTHENTICATION_FAILURES', 'Identification and Authentication Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SOFTWARE_AND_DATA_INTEGRITY_FAILURES', 'Software and Data Integrity Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_LOGGING_AND_MONITORING_FAILURES', 'Security Logging and Monitoring Failures', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVER_SIDE_REQUEST_FORGERY', 'Server Side Request Forgery', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "calendar_period" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('TWENTY_FOUR_HOURS_SEVEN_DAYS', '24x7', NULL, NULL, NULL, NULL, NULL, NULL), - ('BUSINESS_HOURS', 'Business hours', NULL, NULL, NULL, NULL, NULL, NULL), - ('NON_BUSINESS_HOURS', 'Non-business hours', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "tracking_period" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('DAY', 'Day', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOUR', 'Hour', NULL, NULL, NULL, NULL, NULL, NULL), - ('MONTH', 'Month', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUARTER', 'Quarter', NULL, NULL, NULL, NULL, NULL, NULL), - ('WEEK', 'Week', NULL, NULL, NULL, NULL, NULL, NULL), - ('YEAR', 'Year', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "audit_purpose" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('MEANING_DRY_RUN', 'exmeaning dry runternal', NULL, NULL, NULL, NULL, NULL, NULL), - ('OFFICIAL', 'official', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "audit_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('OUTSTANDING', 'Outstanding', NULL, NULL, NULL, NULL, NULL, NULL), - ('FULFILLED', 'Fulfilled', NULL, NULL, NULL, NULL, NULL, NULL), - ('REJECTED', 'Rejected', NULL, NULL, NULL, NULL, NULL, NULL), - ('ACCEPTED', 'Accepted', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "training_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('HIPAA', 'HIPAA', NULL, NULL, NULL, NULL, NULL, NULL), - ('CYBER_SECURITY', 'Cyber Security', NULL, NULL, NULL, NULL, NULL, NULL), - ('OBSERVABILITY_OPEN_TELEMETRY', 'Observability Open Telemetry', NULL, NULL, NULL, NULL, NULL, NULL), - ('BEST_PRACTICES_OF_AGILE', 'Practices of Agile Workflow', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "status_value" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('YES', 'Yes', NULL, NULL, NULL, NULL, NULL, NULL), - ('NO', 'No', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "rating_value" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ONE', '1', NULL, NULL, NULL, NULL, NULL, NULL), - ('TWO', '2', NULL, NULL, NULL, NULL, NULL, NULL), - ('THREE', '3', NULL, NULL, NULL, NULL, NULL, NULL), - ('FOUR', '4', NULL, NULL, NULL, NULL, NULL, NULL), - ('FIVE', '5', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "contract_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('GENERAL_CONTRACT_FOR_SERVICES', 'General Contract for Services', NULL, NULL, NULL, NULL, NULL, NULL), - ('EMPLOYMENT_AGREEMENT', 'Employment Agreement', NULL, NULL, NULL, NULL, NULL, NULL), - ('NONCOMPETE_AGREEMENT', 'Noncompete Agreement', NULL, NULL, NULL, NULL, NULL, NULL), - ('VENDOR_SLA', 'Vendor SLA', NULL, NULL, NULL, NULL, NULL, NULL), - ('VENDOR_NDA', 'Vendor NDA', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "graph_nature" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('SERVICE', 'Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('APP', 'Application', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "asset_risk_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('SECURITY', 'Security', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "risk_subject" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") VALUES ('TECHNICAL_RISK', 'Technical Risk', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "risk_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('BUDGET', 'Budget', NULL, NULL, NULL, NULL, NULL, NULL), - ('QUALITY', 'Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCHEDULE', 'Schedule', NULL, NULL, NULL, NULL, NULL, NULL), - ('SCHEDULE_AND_BUDGET', 'Schedule And Budget', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCESS', 'Access', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA', 'Data', NULL, NULL, NULL, NULL, NULL, NULL), - ('FACILITIES', 'Facilities', NULL, NULL, NULL, NULL, NULL, NULL), - ('FAILURE', 'Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('GENERAL_INFORMATION', 'General Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE', 'Hardware', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOW_TO', 'How To', NULL, NULL, NULL, NULL, NULL, NULL), - ('OTHER', 'Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE', 'Performance', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY', 'Security', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVICE_DELIVERY', 'Service Delivery', NULL, NULL, NULL, NULL, NULL, NULL), - ('SERVICE_PORTFOLIO', 'Service Portfolio', NULL, NULL, NULL, NULL, NULL, NULL), - ('STATUS', 'Status', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUPPORT', 'Support', NULL, NULL, NULL, NULL, NULL, NULL), - ('THRIFTY', 'Thrifty', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_sub_category" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('AUTHORIZATION_ERROR', 'Authorization Error', NULL, NULL, NULL, NULL, NULL, NULL), - ('AVAILABILITY', 'Availability', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_CORRUPTED', 'Data Or File Corrupted', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_INCORRECT', 'Data Or File Incorrect', NULL, NULL, NULL, NULL, NULL, NULL), - ('DATA_OR_FILE_MISSING', 'Data Or File Missing', NULL, NULL, NULL, NULL, NULL, NULL), - ('ERROR_MESSAGE', 'Error Message', NULL, NULL, NULL, NULL, NULL, NULL), - ('FUNCTION_OR_FEATURE_NOT_WORKING', 'Function Or Feature Not Working', NULL, NULL, NULL, NULL, NULL, NULL), - ('FUNCTIONALITY', 'Functionality', NULL, NULL, NULL, NULL, NULL, NULL), - ('GENERAL_INFORMATION', 'General Information', NULL, NULL, NULL, NULL, NULL, NULL), - ('HARDWARE_FAILURE', 'Hardware Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('HOW_TO', 'How To', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT_RESOLUTION_QUALITY', 'Incident Resolution Quality', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT_RESOLUTION_TIME', 'Incident Resolution Time', NULL, NULL, NULL, NULL, NULL, NULL), - ('JOB_FAILED', 'Job Failed', NULL, NULL, NULL, NULL, NULL, NULL), - ('LOGIN_FAILURE', 'Login Failure', NULL, NULL, NULL, NULL, NULL, NULL), - ('MISSING_OR_STOLEN', 'Missing Or Stolen', NULL, NULL, NULL, NULL, NULL, NULL), - ('NEW_SERVICE', 'New Service', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE', 'Performance', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERFORMANCE_DEGRADATION', 'Performance Degradation', NULL, NULL, NULL, NULL, NULL, NULL), - ('PERSON', 'Person', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_BREACH', 'Security Breach', NULL, NULL, NULL, NULL, NULL, NULL), - ('SECURITY_EVENT', 'Security Event/Message', NULL, NULL, NULL, NULL, NULL, NULL), - ('STATUS', 'Status', NULL, NULL, NULL, NULL, NULL, NULL), - ('STORAGE_LIMIT_EXCEEDED', 'Storage Limit Exceeded', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYSTEM_DOWN', 'System Down', NULL, NULL, NULL, NULL, NULL, NULL), - ('SYSTEM_OR_APPLICATION_HANGS', 'System Or Application Hangs', NULL, NULL, NULL, NULL, NULL, NULL), - ('UPGRADE_NEW_RELEASE', 'Upgrade/New Release', NULL, NULL, NULL, NULL, NULL, NULL), - ('VIRUS_ALERT', 'Virus Alert', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_type" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('COMPLAINT', 'Complaint', NULL, NULL, NULL, NULL, NULL, NULL), - ('INCIDENT', 'Incident', NULL, NULL, NULL, NULL, NULL, NULL), - ('REQUEST_FOR_INFORMATION', 'Request For Information', NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO "incident_status" ("code", "value", "created_by", "updated_at", "updated_by", "deleted_at", "deleted_by", "activity_log") - VALUES ('ACCEPTED', 'Accepted', NULL, NULL, NULL, NULL, NULL, NULL), - ('ASSIGNED', 'Assigned', NULL, NULL, NULL, NULL, NULL, NULL), - ('CANCELLED', 'Cancelled', NULL, NULL, NULL, NULL, NULL, NULL), - ('CATEGORIZE', 'Categorize', NULL, NULL, NULL, NULL, NULL, NULL), - ('CLOSED', 'Closed', NULL, NULL, NULL, NULL, NULL, NULL), - ('OPEN', 'Open', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_CHANGE', 'Pending Change', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_CUSTOMER', 'Pending Customer', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_EVIDENCE', 'Pending Evidence', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_OTHER', 'Pending Other', NULL, NULL, NULL, NULL, NULL, NULL), - ('PENDING_VENDOR', 'Pending Vendor', NULL, NULL, NULL, NULL, NULL, NULL), - ('REFERRED', 'Referred', NULL, NULL, NULL, NULL, NULL, NULL), - ('REJECTED', 'Rejected', NULL, NULL, NULL, NULL, NULL, NULL), - ('REOPENED', 'Reopened', NULL, NULL, NULL, NULL, NULL, NULL), - ('REPLACED_PROBLEM', 'Replaced Problem', NULL, NULL, NULL, NULL, NULL, NULL), - ('RESOLVED', 'Resolved', NULL, NULL, NULL, NULL, NULL, NULL), - ('SUSPENDED', 'Suspended', NULL, NULL, NULL, NULL, NULL, NULL), - ('WORK_IN_PROGRESS', 'Work In Progress', NULL, NULL, NULL, NULL, NULL, NULL); ; -- synthetic / test data