diff --git a/InnoMetrics-RestAPI/src/main/resources/liquibase/DBCreation.yml b/InnoMetrics-RestAPI/src/main/resources/liquibase/DBCreation.yml old mode 100644 new mode 100755 index 17b99a0..dbceeb3 --- a/InnoMetrics-RestAPI/src/main/resources/liquibase/DBCreation.yml +++ b/InnoMetrics-RestAPI/src/main/resources/liquibase/DBCreation.yml @@ -1,503 +1,504 @@ -databaseChangeLog: - - changeSet: - id: SchemaCreation_innometrics - author: xvasquez - changes: - - sql: "CREATE SCHEMA innometrics;" - - changeSet: - id: DatabaseCreation_innometrics - author: xvasquez - changes: - - createTable: - schemaName: innometrics - tableName: role - remarks: Table to store system roles information - columns: - - column: - name: name - type: Varchar(256) - constraints: - primaryKey: true - primaryKeyName: role_pk - - column: - name: description - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometrics - tableName: user - remarks: Table to store users information - columns: - - column: - name: email - type: Varchar(256) - constraints: - primaryKey: true - primaryKeyName: user_pk - - column: - name: password - type: Varchar(128) - constraints: - nullable: false - - column: - name: name - type: Varchar(1024) - - column: - name: surname - type: Varchar(1024) - - column: - name: confirmed_at - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometrics - tableName: user_roles - remarks: Table to store the role associated to a user - columns: - - column: - name: name - type: Varchar(256) - constraints: - foreignKeyName: fk_role - references: innometrics.role(name) - nullable: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user - references: innometrics.user(email) - nullable: false - - createTable: - schemaName: innometrics - tableName: project - remarks: Table to store users information - columns: - - column: - name: projectid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: project_pk - - column: - name: name - type: Varchar(256) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometrics - tableName: project_managers - remarks: Table to store the list of managers for each project - columns: - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_managers - references: innometrics.project(projectid) - nullable: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user_managers - references: innometrics.user(email) - nullable: false - - createTable: - schemaName: innometrics - tableName: project_users - remarks: Table to store the list of users for each project - columns: - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_users - references: innometrics.project(projectid) - nullable: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user_users - references: innometrics.user(email) - nullable: false - - createTable: - schemaName: innometrics - tableName: invited_managers - remarks: Table to store the list of invited managers for each project - columns: - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_invmanagers - references: innometrics.project(projectid) - nullable: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user_invmanagers - references: innometrics.user(email) - nullable: false - - createTable: - schemaName: innometrics - tableName: invited_users - remarks: Table to store the list of invited users for each project - columns: - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_invusers - references: innometrics.project(projectid) - nullable: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user_invusers - references: innometrics.user(email) - nullable: false - - createTable: - schemaName: innometrics - tableName: activity - remarks: Table to store activities information - columns: - - column: - name: activityid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: activity_pk - - column: - name: activitytype - type: Varchar(256) - constraints: - nullable: false - defaultValue: "os" - - column: - name: idle_activity - type: Boolean - constraints: - nullable: false - defaultValue: false - - column: - name: email - type: Varchar(256) - constraints: - foreignKeyName: fk_user_activity - references: innometrics.user(email) - nullable: false - - column: - name: start_time - type: Date - constraints: - nullable: false - - column: - name: end_time - type: Date - constraints: - nullable: false - - column: - name: executable_name - type: Varchar(512) - constraints: - nullable: false - - column: - name: browser_url - type: Varchar(1024) - - column: - name: browser_title - type: Varchar(1024) - - column: - name: ip_address - type: Varchar(1024) - - column: - name: mac_address - type: Varchar(1024) - - column: - name: value - type: Varchar(1024) - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: Measure_tables_creation - author: xvasquez - changes: - - createTable: - schemaName: innometrics - tableName: measurementtypes - remarks: Table to store the types of measurements that can be collected - columns: - - column: - name: measurementtypeid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: measurementtypes_pk - - column: - name: label - type: Varchar(128) - constraints: - nullable: false - - column: - name: description - type: varchar(1024) - - column: - name: weight - type: float - constraints: - nullable: false - - column: - name: scale - type: float - - column: - name: operation - type: Varchar(100) - - column: - name: isActive - type: varchar(1) - constraints: - nullable: false - defaultValue: "Y" - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometrics - tableName: measurements - remarks: Table the measurements collected by each data collector - columns: - - column: - name: id - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: measurements_pk - - column: - name: activityid - type: Integer - constraints: - foreignKeyName: fk_activity_measurement - references: innometrics.activity(activityid) - nullable: false - - column: - name: measurementtypeid - type: Integer - constraints: - foreignKeyName: fk_measuretype_measurement - references: innometrics.measurementtypes(measurementtypeid) - nullable: false - - column: - name: value - type: float - constraints: - nullable: false - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: rename_column - author: xvasquez - changes: - - renameColumn: - schemaName: innometrics - tableName: measurementtypes - columnDataType: varchar(1) - newColumnName: isactive - oldColumnName: isActive - - changeSet: - id: refactor_measurement_table - author: xvasquez - changes: - - modifyDataType: - schemaName: innometrics - tableName: measurements - columnName: value - newDataType: Varchar(128) - - addColumn: - schemaName: innometrics - tableName: measurements - columns: - - column: - name: alternativelabel - type: Varchar(256) - - changeSet: - id: remove_fk_for_activitie_users - author: xvasquez - changes: - - dropForeignKeyConstraint: - baseTableName: activity - baseTableSchemaName: innometrics - constraintName: fk_user_activity - - - changeSet: - id: creation_table_to_manage_collector_version - author: xvasquez - changes: - - createTable: - schemaName: innometrics - tableName: collector_version - columns: - - column: - name: id - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: collectorversion_pk - - column: - name: osversion - type: Varchar(128) - constraints: - nullable: false - - column: - name: value - type: Varchar(25) - constraints: - nullable: false - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby +databaseChangeLog: + - changeSet: + id: SchemaCreation_innometrics + author: xvasquez + changes: + # SOMETHING WRONG SAME SCHEMA IN ACTIVITIES COLLECTOR!!! + - sql: "CREATE SCHEMA innometrics;" + - changeSet: + id: DatabaseCreation_innometrics + author: xvasquez + changes: + - createTable: + schemaName: innometrics + tableName: role + remarks: Table to store system roles information + columns: + - column: + name: name + type: Varchar(256) + constraints: + primaryKey: true + primaryKeyName: role_pk + - column: + name: description + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometrics + tableName: user + remarks: Table to store users information + columns: + - column: + name: email + type: Varchar(256) + constraints: + primaryKey: true + primaryKeyName: user_pk + - column: + name: password + type: Varchar(128) + constraints: + nullable: false + - column: + name: name + type: Varchar(1024) + - column: + name: surname + type: Varchar(1024) + - column: + name: confirmed_at + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometrics + tableName: user_roles + remarks: Table to store the role associated to a user + columns: + - column: + name: name + type: Varchar(256) + constraints: + foreignKeyName: fk_role + references: innometrics.role(name) + nullable: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user + references: innometrics.user(email) + nullable: false + - createTable: + schemaName: innometrics + tableName: project + remarks: Table to store users information + columns: + - column: + name: projectid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: project_pk + - column: + name: name + type: Varchar(256) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometrics + tableName: project_managers + remarks: Table to store the list of managers for each project + columns: + - column: + name: projectid + type: Integer + constraints: + foreignKeyName: fk_project_managers + references: innometrics.project(projectid) + nullable: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user_managers + references: innometrics.user(email) + nullable: false + - createTable: + schemaName: innometrics + tableName: project_users + remarks: Table to store the list of users for each project + columns: + - column: + name: projectid + type: Integer + constraints: + foreignKeyName: fk_project_users + references: innometrics.project(projectid) + nullable: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user_users + references: innometrics.user(email) + nullable: false + - createTable: + schemaName: innometrics + tableName: invited_managers + remarks: Table to store the list of invited managers for each project + columns: + - column: + name: projectid + type: Integer + constraints: + foreignKeyName: fk_project_invmanagers + references: innometrics.project(projectid) + nullable: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user_invmanagers + references: innometrics.user(email) + nullable: false + - createTable: + schemaName: innometrics + tableName: invited_users + remarks: Table to store the list of invited users for each project + columns: + - column: + name: projectid + type: Integer + constraints: + foreignKeyName: fk_project_invusers + references: innometrics.project(projectid) + nullable: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user_invusers + references: innometrics.user(email) + nullable: false + - createTable: + schemaName: innometrics + tableName: activity + remarks: Table to store activities information + columns: + - column: + name: activityid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: activity_pk + - column: + name: activitytype + type: Varchar(256) + constraints: + nullable: false + defaultValue: "os" + - column: + name: idle_activity + type: Boolean + constraints: + nullable: false + defaultValue: false + - column: + name: email + type: Varchar(256) + constraints: + foreignKeyName: fk_user_activity + references: innometrics.user(email) + nullable: false + - column: + name: start_time + type: Date + constraints: + nullable: false + - column: + name: end_time + type: Date + constraints: + nullable: false + - column: + name: executable_name + type: Varchar(512) + constraints: + nullable: false + - column: + name: browser_url + type: Varchar(1024) + - column: + name: browser_title + type: Varchar(1024) + - column: + name: ip_address + type: Varchar(1024) + - column: + name: mac_address + type: Varchar(1024) + - column: + name: value + type: Varchar(1024) + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: Measure_tables_creation + author: xvasquez + changes: + - createTable: + schemaName: innometrics + tableName: measurementtypes + remarks: Table to store the types of measurements that can be collected + columns: + - column: + name: measurementtypeid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: measurementtypes_pk + - column: + name: label + type: Varchar(128) + constraints: + nullable: false + - column: + name: description + type: varchar(1024) + - column: + name: weight + type: float + constraints: + nullable: false + - column: + name: scale + type: float + - column: + name: operation + type: Varchar(100) + - column: + name: isActive + type: varchar(1) + constraints: + nullable: false + defaultValue: "Y" + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometrics + tableName: measurements + remarks: Table the measurements collected by each data collector + columns: + - column: + name: id + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: measurements_pk + - column: + name: activityid + type: Integer + constraints: + foreignKeyName: fk_activity_measurement + references: innometrics.activity(activityid) + nullable: false + - column: + name: measurementtypeid + type: Integer + constraints: + foreignKeyName: fk_measuretype_measurement + references: innometrics.measurementtypes(measurementtypeid) + nullable: false + - column: + name: value + type: float + constraints: + nullable: false + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: rename_column + author: xvasquez + changes: + - renameColumn: + schemaName: innometrics + tableName: measurementtypes + columnDataType: varchar(1) + newColumnName: isactive + oldColumnName: isActive + - changeSet: + id: refactor_measurement_table + author: xvasquez + changes: + - modifyDataType: + schemaName: innometrics + tableName: measurements + columnName: value + newDataType: Varchar(128) + - addColumn: + schemaName: innometrics + tableName: measurements + columns: + - column: + name: alternativelabel + type: Varchar(256) + - changeSet: + id: remove_fk_for_activitie_users + author: xvasquez + changes: + - dropForeignKeyConstraint: + baseTableName: activity + baseTableSchemaName: innometrics + constraintName: fk_user_activity + + - changeSet: + id: creation_table_to_manage_collector_version + author: xvasquez + changes: + - createTable: + schemaName: innometrics + tableName: collector_version + columns: + - column: + name: id + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: collectorversion_pk + - column: + name: osversion + type: Varchar(128) + constraints: + nullable: false + - column: + name: value + type: Varchar(25) + constraints: + nullable: false + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby type: Varchar(25) \ No newline at end of file diff --git a/activities-collector/src/main/resources/liquibase/DBCreation.yml b/activities-collector/src/main/resources/liquibase/DBCreation.yml index b4b6f33..d7a9323 100644 --- a/activities-collector/src/main/resources/liquibase/DBCreation.yml +++ b/activities-collector/src/main/resources/liquibase/DBCreation.yml @@ -851,120 +851,6 @@ databaseChangeLog: - column: name: osversion type: Varchar(256) - - changeSet: - id: SchemaCreation_innometricscnf_ - author: xvasquez - changes: - - sql: "CREATE SCHEMA innometricsconfig;" - - changeSet: - id: configtablecreation - author: xvasquez - changes: - - createTable: - schemaName: innometricsconfig - tableName: cl_categories - remarks: Table to store categories availables to the classification module - columns: - - column: - name: catid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: classCategories_pk - - column: - name: catname - type: Varchar(1024) - constraints: - nullable: false - - column: - name: catdescription - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - - createTable: - schemaName: innometricsconfig - tableName: cl_apps_categories - remarks: Table to store the apps belong to each category - columns: - - column: - name: appid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: classApps_pk - - column: - name: catid - type: Integer - constraints: - foreignKeyName: fk_classCategories - references: innometricsconfig.cl_categories(catid) - nullable: false - - column: - name: appname - type: Varchar(1024) - constraints: - nullable: false - - column: - name: appdescription - type: Varchar(1024) - constraints: - nullable: false - - column: - name: executablefile - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - changeSet: id: "add column mac_address to cumlativerepactivity table" author: azag diff --git a/agents-gateway/src/main/resources/liquibase/DBCreation.yml b/agents-gateway/src/main/resources/liquibase/DBCreation.yml old mode 100644 new mode 100755 index 8a8b917..dd3d975 --- a/agents-gateway/src/main/resources/liquibase/DBCreation.yml +++ b/agents-gateway/src/main/resources/liquibase/DBCreation.yml @@ -1,552 +1,548 @@ -databaseChangeLog: - - changeSet: - id: SchemaCreation_innometricsagents - author: xvasquez - changes: - - sql: "CREATE SCHEMA innometricsagents;" - - changeSet: - id: DatabaseCreation_innometricsAgents - author: xvasquez - changes: - - createTable: - schemaName: innometricsagents - tableName: agentconfig - remarks: Table to store the agents basic configuration - columns: - - column: - name: agentid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agent_pk - - column: - name: agentname - type: Varchar(256) - constraints: - nullable: false - - column: - name: description - type: Varchar(1024) - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: agentconfigmethods - remarks: Table to store the agents methods endpoint - columns: - - column: - name: methodid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agentconfigmethods_pk - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agentconfig - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: endpoint - type: Varchar(1024) - constraints: - nullable: false - - column: - name: description - type: Varchar(128) - - column: - name: operation - type: Varchar(128) - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: agentconfigdetails - remarks: Table to store the details of agents configuration - columns: - - column: - name: configdetid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agentconfigdet_pk - - column: - name: methodid - type: Integer - constraints: - foreignKeyName: fk_methodconfig - references: innometricsagents.agentconfigmethods(methodid) - nullable: false - - column: - name: paramname - type: Varchar(128) - constraints: - nullable: false - - column: - name: paramtype - type: Varchar(128) - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValue: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: adding_response_config_table - author: xvasquez - changes: - - createTable: - schemaName: innometricsagents - tableName: agentresponseconfig - remarks: Table to store the details of agents response configuration - columns: - - column: - name: configresponseid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agentresponseconfig_pk - - column: - name: methodid - type: Integer - constraints: - foreignKeyName: fk_methodresponseconfig - references: innometricsagents.agentconfigmethods(methodid) - nullable: false - - column: - name: responseparam - type: Varchar(128) - constraints: - nullable: false - - column: - name: paramname - type: Varchar(128) - - column: - name: paramtype - type: Varchar(128) - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: "adding request type to methods config" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfigmethods - columns: - - column: - name: requesttype - type: Varchar(256) - - changeSet: - id: "adding fetching data structures" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: sourcetype - type: Varchar(256) - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: dbschemasource - type: Varchar(256) - - createTable: - schemaName: innometricsagents - tableName: repos_x_project - remarks: Table to store the relationship between a particular project and its corresponding repos - columns: - - column: - name: configid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: reposproject_pk - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_auth_users - references: innometricsauth.project(projectid) - nullable: false - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agentconfig_fetching - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: repoid - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: agent_data_config - remarks: Table to store the configuration to fetch the events data from the data base - columns: - - column: - name: datacofingid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: dataconfig_pk - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agentconfig_data - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: schemaname - type: Varchar(128) - constraints: - nullable: true - - column: - name: tablename - type: Varchar(128) - constraints: - nullable: false - - column: - name: eventdatefield - type: Varchar(128) - constraints: - nullable: false - - column: - name: eventauthorfield - type: Varchar(128) - constraints: - nullable: false - - column: - name: eventdescriptionfield - type: Varchar(128) - constraints: - nullable: true - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: "adding repo id field to agent configuration" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: repoidfield - type: Varchar(256) - - changeSet: - id: "adding event type to data config" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agent_data_config - columns: - - column: - name: eventtype - type: Varchar(256) - - changeSet: - id: "adding OAuth field to agent configuration" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: oauthuri - type: Varchar(256) - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: authenticationmethod - type: Varchar(256) - - changeSet: - id: "update OAuth field to agent configuration" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: accesstokenendpoint - type: Varchar(256) - constraints: - nullable: true - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: authorizationbaseurl - type: Varchar(256) - constraints: - nullable: true - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: requesttokenendpoint - type: Varchar(256) - constraints: - nullable: true - - changeSet: - id: "update OAuth API field to agent configuration" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: apikey - type: Varchar(256) - constraints: - nullable: true - - addColumn: - schemaName: innometricsagents - tableName: agentconfig - columns: - - column: - name: apisecret - type: Varchar(256) - constraints: - nullable: true - - changeSet: - id: "adding agents_x_project table" - author: xvasquez - changes: - - createTable: - schemaName: innometricsagents - tableName: agents_x_project - remarks: Table to store the relationship between a particular project and its corresponding agents - columns: - - column: - name: configid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agentsproject_pk - - column: - name: projectid - type: Integer - constraints: - foreignKeyName: fk_project_agents - references: innometricsauth.project(projectid) - nullable: false - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agent_projects - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: key - type: Varchar(1024) - constraints: - nullable: false - - column: - name: token - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: "adding request param name to agentconfigdetails" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfigdetails - columns: - - column: - name: requestparam - type: Varchar(256) - constraints: - nullable: true - - changeSet: - id: "adding default value for request param name to agentconfigdetails" - author: xvasquez - changes: - - addColumn: - schemaName: innometricsagents - tableName: agentconfigdetails - columns: - - column: - name: defaultvalue - type: Varchar(256) - constraints: - nullable: true +databaseChangeLog: + - changeSet: + id: SchemaCreation_innometricsagents + author: xvasquez + changes: + - sql: "CREATE SCHEMA innometricsagents;" + - changeSet: + id: DatabaseCreation_innometricsAgents + author: xvasquez + changes: + - createTable: + schemaName: innometricsagents + tableName: agentconfig + remarks: Table to store the agents basic configuration + columns: + - column: + name: agentid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agent_pk + - column: + name: agentname + type: Varchar(256) + constraints: + nullable: false + - column: + name: description + type: Varchar(1024) + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: agentconfigmethods + remarks: Table to store the agents methods endpoint + columns: + - column: + name: methodid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agentconfigmethods_pk + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agentconfig + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: endpoint + type: Varchar(1024) + constraints: + nullable: false + - column: + name: description + type: Varchar(128) + - column: + name: operation + type: Varchar(128) + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: agentconfigdetails + remarks: Table to store the details of agents configuration + columns: + - column: + name: configdetid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agentconfigdet_pk + - column: + name: methodid + type: Integer + constraints: + foreignKeyName: fk_methodconfig + references: innometricsagents.agentconfigmethods(methodid) + nullable: false + - column: + name: paramname + type: Varchar(128) + constraints: + nullable: false + - column: + name: paramtype + type: Varchar(128) + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValue: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: adding_response_config_table + author: xvasquez + changes: + - createTable: + schemaName: innometricsagents + tableName: agentresponseconfig + remarks: Table to store the details of agents response configuration + columns: + - column: + name: configresponseid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agentresponseconfig_pk + - column: + name: methodid + type: Integer + constraints: + foreignKeyName: fk_methodresponseconfig + references: innometricsagents.agentconfigmethods(methodid) + nullable: false + - column: + name: responseparam + type: Varchar(128) + constraints: + nullable: false + - column: + name: paramname + type: Varchar(128) + - column: + name: paramtype + type: Varchar(128) + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: "adding request type to methods config" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfigmethods + columns: + - column: + name: requesttype + type: Varchar(256) + - changeSet: + id: "adding fetching data structures" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: sourcetype + type: Varchar(256) + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: dbschemasource + type: Varchar(256) + - createTable: + schemaName: innometricsagents + tableName: repos_x_project + remarks: Table to store the relationship between a particular project and its corresponding repos + columns: + - column: + name: configid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: reposproject_pk + - column: + name: projectid + type: Integer + constraints: + nullable: false + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agentconfig_fetching + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: repoid + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: agent_data_config + remarks: Table to store the configuration to fetch the events data from the data base + columns: + - column: + name: datacofingid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: dataconfig_pk + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agentconfig_data + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: schemaname + type: Varchar(128) + constraints: + nullable: true + - column: + name: tablename + type: Varchar(128) + constraints: + nullable: false + - column: + name: eventdatefield + type: Varchar(128) + constraints: + nullable: false + - column: + name: eventauthorfield + type: Varchar(128) + constraints: + nullable: false + - column: + name: eventdescriptionfield + type: Varchar(128) + constraints: + nullable: true + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: "adding repo id field to agent configuration" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: repoidfield + type: Varchar(256) + - changeSet: + id: "adding event type to data config" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agent_data_config + columns: + - column: + name: eventtype + type: Varchar(256) + - changeSet: + id: "adding OAuth field to agent configuration" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: oauthuri + type: Varchar(256) + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: authenticationmethod + type: Varchar(256) + - changeSet: + id: "update OAuth field to agent configuration" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: accesstokenendpoint + type: Varchar(256) + constraints: + nullable: true + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: authorizationbaseurl + type: Varchar(256) + constraints: + nullable: true + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: requesttokenendpoint + type: Varchar(256) + constraints: + nullable: true + - changeSet: + id: "update OAuth API field to agent configuration" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: apikey + type: Varchar(256) + constraints: + nullable: true + - addColumn: + schemaName: innometricsagents + tableName: agentconfig + columns: + - column: + name: apisecret + type: Varchar(256) + constraints: + nullable: true + - changeSet: + id: "adding agents_x_project table" + author: xvasquez + changes: + - createTable: + schemaName: innometricsagents + tableName: agents_x_project + remarks: Table to store the relationship between a particular project and its corresponding agents + columns: + - column: + name: configid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agentsproject_pk + - column: + name: projectid + type: Integer + constraints: + nullable: false + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agent_projects + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: key + type: Varchar(1024) + constraints: + nullable: false + - column: + name: token + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: "adding request param name to agentconfigdetails" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfigdetails + columns: + - column: + name: requestparam + type: Varchar(256) + constraints: + nullable: true + - changeSet: + id: "adding default value for request param name to agentconfigdetails" + author: xvasquez + changes: + - addColumn: + schemaName: innometricsagents + tableName: agentconfigdetails + columns: + - column: + name: defaultvalue + type: Varchar(256) + constraints: + nullable: true diff --git a/agents-gateway/src/main/resources/liquibase/DBUpdate.yml b/agents-gateway/src/main/resources/liquibase/DBUpdate.yml old mode 100644 new mode 100755 index 3cdb6b2..70e67a8 --- a/agents-gateway/src/main/resources/liquibase/DBUpdate.yml +++ b/agents-gateway/src/main/resources/liquibase/DBUpdate.yml @@ -1,136 +1,132 @@ -databaseChangeLog: - - changeSet: - id: "update db structure agents" - author: xvasquez - changes: - - createTable: - schemaName: innometricsagents - tableName: agents_x_company - remarks: "Table to store the configuration for an agent linked to on particular company" - columns: - - column: - name: configid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: agentscompany_pk - - column: - name: companyid - type: Integer - constraints: - foreignKeyName: fk_company_agents - references: innometricsauth.company(companyid) - nullable: false - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agent_projects - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: key - type: Varchar(1024) - constraints: - nullable: false - - column: - name: token - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: externalproject_x_team - remarks: Table to store teams information - columns: - - column: - name: configid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: externalproject_pk - - column: - name: teamid - type: Integer - constraints: - foreignKeyName: fk_teams_auth_project - references: innometricsauth.teams(teamid) - nullable: false - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agentconfig_fetching - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: repoid - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - changeSet: - id: "Remove not null constraint" - author: xvasquez - changes: - - dropNotNullConstraint: - schemaName: innometricsagents - tableName: agents_x_company - columnName: key - - changeSet: - id: "Remove not null constraint 2" - author: xvasquez - changes: - - dropNotNullConstraint: - schemaName: innometricsagents - tableName: agents_x_project +databaseChangeLog: + - changeSet: + id: "update db structure agents" + author: xvasquez + changes: + - createTable: + schemaName: innometricsagents + tableName: agents_x_company + remarks: "Table to store the configuration for an agent linked to on particular company" + columns: + - column: + name: configid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: agentscompany_pk + - column: + name: companyid + type: Integer + constraints: + nullable: false + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agent_projects + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: key + type: Varchar(1024) + constraints: + nullable: false + - column: + name: token + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: externalproject_x_team + remarks: Table to store teams information + columns: + - column: + name: configid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: externalproject_pk + - column: + name: teamid + type: Integer + constraints: + nullable: false + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agentconfig_fetching + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: repoid + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - changeSet: + id: "Remove not null constraint" + author: xvasquez + changes: + - dropNotNullConstraint: + schemaName: innometricsagents + tableName: agents_x_company + columnName: key + - changeSet: + id: "Remove not null constraint 2" + author: xvasquez + changes: + - dropNotNullConstraint: + schemaName: innometricsagents + tableName: agents_x_project columnName: key \ No newline at end of file diff --git a/agents-gateway/src/main/resources/liquibase/DBUpdate2.yml b/agents-gateway/src/main/resources/liquibase/DBUpdate2.yml old mode 100644 new mode 100755 index a15af24..c9727f6 --- a/agents-gateway/src/main/resources/liquibase/DBUpdate2.yml +++ b/agents-gateway/src/main/resources/liquibase/DBUpdate2.yml @@ -1,180 +1,180 @@ -databaseChangeLog: - - changeSet: - id: "multi agent handler" - author: xvasquez - changes: - - createTable: - schemaName: innometricsagents - tableName: agent_webhooks - remarks: "Table to store the webhook header" - columns: - - column: - name: webookid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: webhook_pk - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agent_webhooks - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: webhooktag - type: Varchar(1024) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: webhook_mapping - remarks: "Table to store the configuration for the webhook fields" - columns: - - column: - name: configid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: webhook_mapping_pk - - column: - name: webookid - type: Integer - constraints: - foreignKeyName: fk_agent_webhooks - references: innometricsagents.agent_webhooks(webookid) - nullable: false - - column: - name: eventfieldid - type: Varchar(1024) - constraints: - nullable: false - - column: - name: mappingrule - type: Varchar(1024) - constraints: - nullable: false - - column: - name: defaultvalue - type: Varchar(1024) - constraints: - nullable: false - - column: - name: datatype - type: Varchar(100) - constraints: - nullable: false - - column: - name: isactive - type: Varchar(1) - constraints: - nullable: false - defaultValue: 'Y' - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby - type: Varchar(25) - - createTable: - schemaName: innometricsagents - tableName: repos_events - remarks: "table to store multiple agents events" - columns: - - column: - name: eventid - type: Integer - autoIncrement: true - constraints: - primaryKey: true - primaryKeyName: repos_events_pk - - column: - name: agentid - type: Integer - constraints: - foreignKeyName: fk_agentconfig_repos_events - references: innometricsagents.agentconfig(agentid) - nullable: false - - column: - name: repoid - type: Integer - constraints: - foreignKeyName: fk_agentconfig_repo_id - references: innometricsagents.repos_x_project(configid) - nullable: false - - column: - name: eventtype - type: Varchar(1024) - constraints: - nullable: false - - column: - name: eventdate - type: Date - constraints: - nullable: false - - column: - name: eventauthor - type: Varchar(1024) - constraints: - nullable: false - - column: - name: metadata - type: json - constraints: - nullable: true - - column: - name: creationdate - type: Date - constraints: - nullable: false - defaultValueComputed: current_timestamp - - column: - name: createdby - type: Varchar(25) - constraints: - nullable: false - defaultValueComputed: USER - - column: - name: lastupdate - type: Date - - column: - name: updateby +databaseChangeLog: + - changeSet: + id: "multi agent handler" + author: xvasquez + changes: + - createTable: + schemaName: innometricsagents + tableName: agent_webhooks + remarks: "Table to store the webhook header" + columns: + - column: + name: webookid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: webhook_pk + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agent_webhooks + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: webhooktag + type: Varchar(1024) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: webhook_mapping + remarks: "Table to store the configuration for the webhook fields" + columns: + - column: + name: configid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: webhook_mapping_pk + - column: + name: webookid + type: Integer + constraints: + foreignKeyName: fk_agent_webhooks + references: innometricsagents.agent_webhooks(webookid) + nullable: false + - column: + name: eventfieldid + type: Varchar(1024) + constraints: + nullable: false + - column: + name: mappingrule + type: Varchar(1024) + constraints: + nullable: false + - column: + name: defaultvalue + type: Varchar(1024) + constraints: + nullable: false + - column: + name: datatype + type: Varchar(100) + constraints: + nullable: false + - column: + name: isactive + type: Varchar(1) + constraints: + nullable: false + defaultValue: 'Y' + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby + type: Varchar(25) + - createTable: + schemaName: innometricsagents + tableName: repos_events + remarks: "table to store multiple agents events" + columns: + - column: + name: eventid + type: Integer + autoIncrement: true + constraints: + primaryKey: true + primaryKeyName: repos_events_pk + - column: + name: agentid + type: Integer + constraints: + foreignKeyName: fk_agentconfig_repos_events + references: innometricsagents.agentconfig(agentid) + nullable: false + - column: + name: repoid + type: Integer + constraints: + foreignKeyName: fk_agentconfig_repo_id + references: innometricsagents.repos_x_project(configid) + nullable: false + - column: + name: eventtype + type: Varchar(1024) + constraints: + nullable: false + - column: + name: eventdate + type: Date + constraints: + nullable: false + - column: + name: eventauthor + type: Varchar(1024) + constraints: + nullable: false + - column: + name: metadata + type: json + constraints: + nullable: true + - column: + name: creationdate + type: Date + constraints: + nullable: false + defaultValueComputed: current_timestamp + - column: + name: createdby + type: Varchar(25) + constraints: + nullable: false + defaultValueComputed: USER + - column: + name: lastupdate + type: Date + - column: + name: updateby type: Varchar(25) \ No newline at end of file diff --git a/auth-server/src/main/resources/liquibase/DBUpdate2.yml b/auth-server/src/main/resources/liquibase/DBUpdate2.yml index 6819472..fe1fe41 100644 --- a/auth-server/src/main/resources/liquibase/DBUpdate2.yml +++ b/auth-server/src/main/resources/liquibase/DBUpdate2.yml @@ -14,5 +14,4 @@ databaseChangeLog: constraints: references: innometricsauth.role(name) foreignKeyName: fk_role -# references: innometricsauth.company(companyid) nullable: false \ No newline at end of file