DIGIT Docs
Works v1.0
  • DIGIT Knowledge Base
  • Local Governance
Works v1.0
  • Introducing DIGIT Works Platform
  • Platform
    • Release Notes
      • MDMS & Configuration Updates
      • Test cases
      • Data Migration
      • Service Build Updates
    • Platform Capabilities
    • Architecture
      • High Level Design
      • Low Level Design
        • Registries
          • Individual
          • Bank Account
          • Organization
        • Services
          • Project
          • Detailed Estimates
          • Contracts
          • Attendance
          • Muster Roll
          • Expense
          • Detailed Measurement Book
    • Functional Specifications
      • Project
      • Estimates
      • Organisation
      • Attendance Management
      • Measurements
      • Muster Roll
      • Expenditure / Billing
      • Contracts
    • Platform Services
      • Project
      • Estimate
      • Contracts
      • Attendance
      • Muster Roll
      • Expense
      • Bank Account
      • Organisation
      • Measurement Book Registry
      • Measurement Book Service
    • Source Code
    • Roadmap
    • Installation
    • Configuration
      • Service Configuration
        • Project
        • Estimate
        • Contract
        • Attendance
        • Muster Roll
        • Expense
        • Bank accounts
        • Organisation
        • Individual
        • Measurement Book Registry
        • Measurement Book Service
  • Products
    • Works App
      • UX Design
      • Technical Design
      • Field App User Manual
      • Configuration Manual
      • Technical Manual
  • Programmes
    • MUKTASoft v1.0
    • MUKTASoft v1.1
    • MUKTASoft v2.0
      • Specifications
        • Roadmap
        • User Persona
        • Functional Requirements
          • Product Requirements Document v2.0
          • User Stories
            • Time Extension
              • CBO: Create Time Extension
              • Time Extension Workflow
              • EMP: Create Time Extension
              • Search and View Time Extension
              • CBO: My Requests
              • CBO: Edit Time Extension
            • JIT-FS Integration
              • Fund Allocation Register
              • Create Payment Instruction
              • PIS: Payment Instruction Status
              • PAG: Payment Advice Status
              • PD: Update payment details
              • FD: Update Failed Payments
              • Create Revised Payment Instruction
              • Revised PI: Update payment details
              • Revised PI: Updated Failed Payments
              • Search Payment Instruction
              • View Payment Instruction
            • Work Order
              • Create Work Order
              • Work Order Workflow
              • Work Order Inbox Page
              • Create/ Submit Work Order
              • Edit/Submit Work Order
              • Verify & Forward
              • Send Back
              • Send Back To Originator
              • Reject Work Order
              • Approve
              • Search Work Order
              • Work Order PDF
            • Dashboard v1.0
              • Commons
              • KPIs: Actions Items
              • KPIs: SLA Breached
              • KPIs: Leaderboard
              • KPIs: Activities by Status
              • KPIs: Payments
              • KPIs: Expenditure
            • Schedule of rates
              • Create SOR
              • Search SOR
              • View SOR
              • Modify SOR
              • Add/ Modify Rate
            • Detailed Estimate
              • Create Detailed Estimate
              • Change in workflow
              • Change in edit estimate
              • Search and View Detailed Estimate
            • Detailed MB
              • Create MB
              • MB Inbox
              • MB Workflow
              • Search MB
              • View MB
              • Edit MB
            • Revise Estimate
              • Create Revised Estimate
              • Revised Estimate Workflow
              • View Revised Estimate
              • Generate Deviation Statement
      • Deployment
        • Release Notes
          • Service Build Updates
          • MDMS & Configuration Updates
          • Gate 2 Release Checklist
          • Test Cases
        • Deployment Guide
          • Dashboard Reindexing
        • MuktaSoft Services
          • IFMS Adapter
          • Expense Calculator
          • Works PDF
          • Mukta-services
          • SOR Uploader
          • Bill Scheduler
        • Configuration
          • Master Data Templates
            • Project Type
            • Target Demography
            • Unit Of Measurement (Units)
            • Overheads
            • Skill Category & Skills
            • Community-Based Organisation Roles
            • Scheme
            • Expense Heads
            • Standard Deductions
            • Organisation Type
            • Organisation Sub Type
            • Organisation Functional Category
            • Organisation Class/Rank
            • HRMS Sections/Departments
            • HRMS Designation
            • HRMS Employment Type
            • User Role
            • Organization
            • Wage Seeker
            • Tenants
            • Ward Boundary
            • Locality Boundary
            • Payment Advice Format
            • Users Data
            • Schedule of rates
            • SOR Type
            • SOR Subtype
            • SOR Variant
            • SOR Heads
          • Notifications & SMS Templates
          • Localisation
          • Platform Service Configuration
          • UI Configuration
            • Common Configurations
              • Role Configuration
              • MDMS Configuration
              • APK Generation
            • Modules
              • Project
              • Estimate
              • Work Order
                • Time Extension
              • Muster Roll
              • Bill
              • Organization
              • Wage Seeker
              • Wage Seeker (CBO Application)
              • Attendance (CBO Application)
              • Muster Roll (CBO Application)
              • Mukta Dashboard
              • Measurement
              • SOR's and Rates
              • IFMS Adapter UI
              • Estimate
                • Create Estimate
                • Estimate Worflow
                • Modify Estimate
              • Attendance Management
                • Inbox
                • View Attendance
                • Modify Attendance
              • Contracts
                • Create Contract
                • Contract Workflow
                • Modify Contract
        • Customisation
          • Works UI
            • UI Tech Flow Diagrams
          • UI Screens Customisation
            • Document Upload Container
            • CSS Customisation
            • Inbox/Search Screen
      • Implementation
        • Go Live Definition
        • Sucess Metrics
        • Adoption Metrics
        • Adoption Template
        • Implementation Plan & Checklist
        • Issue Management - Standard Operating Procedures
        • UAT Planning
          • UAT Test Case Scenarios
          • UAT Schedule Plan
          • Issue Reporting Template
          • UAT Credentials
        • Training Resources
          • User Manual
            • Getting Started
            • CBO User Manual
              • CBO - Getting Started
              • My Works
              • Track Attendance
              • Muster Rolls
              • My Bills
              • My Requests
            • Employee User Manual
              • Project
              • Estimate
              • Revise Estimate
              • Work Order
              • Time Extension
              • Billing
              • Registries
                • Wage Seekers
                • Organizations
              • Payments
              • Measurement Book
              • Schedule of Rates
          • Training Videos
  • COMMUNITY
    • Discussion Board
    • Issues
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Organisation Service
  • Migration Steps
  • Contracts migration

Was this helpful?

Edit on GitHub
Export as PDF
  1. Platform
  2. Release Notes

Data Migration

PreviousTest casesNextService Build Updates

Last updated 1 year ago

Was this helpful?

Organisation Service

Organisation Service: Implemented encryption on Organisation user details

Note: Before migration make sure your elastic index is not read-only.

Build for migration: organisation-db:PFM-4468_Organisation_Encryption_Migration-7903f8ed-104

Run the following query: CREATE TABLE IF NOT EXISTS encryption_migration(uuid VARCHAR(100), is_migrated boolean);

Migration Steps

To migrate data follow the steps given below:

  1. Use the Specific Branch:

    • Access the with the mentioned changes.

    • to access the branch and change details.

  2. Build and Deploy the Service:

    • Clone or download the code from the specific branch.

    • Run the following query: CREATE TABLE IF NOT EXISTS encryption_migration(uuid VARCHAR(100), is_migrated boolean);

    • Use the curl below to migrate the data.

  3. curl --location 'http://localhost:8035/org-services/organisation/v1/_migrate' \
    --header 'authority: works-uat.digit.org' \
    --header 'accept: application/json, text/plain, */*' \
    --header 'accept-language: en-US,en;q=0.9' \
    --header 'content-type: application/json' \
    --header 'cookie: intercom-id-xp1951jv=72181a5e-32d1-4d97-8e85-5e9574ee7ede; intercom-device-id-xp1951jv=9586a950-3d1e-4818-bae2-c9673e615146; _ga=GA1.1.1354941045.1656251739; _ga_H9YC8FEN6F=GS1.1.1684744433.6.1.1684744462.31.0.0; amp_fef1e8=7b52e48b-c09e-406a-aedb-0c7c474c5f69R...1h119fs43.1h11aomp6.95.18.ad; _ga_XBQP06FR8V=GS1.1.1684745770.1.0.1684745773.0.0.0; __cuid=626a55cb986f4721b4761ce8d267d319' \
    --header 'dnt: 1' \
    --header 'origin: https://works-uat.digit.org' \
    --header 'referer: https://works-uat.digit.org/works-ui/employee/masters/view-organization?tenantId=statea.cityone&orgId=ORG-000071' \
    --header 'sec-ch-ua: "Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"' \
    --header 'sec-ch-ua-mobile: ?0' \
    --header 'sec-ch-ua-platform: "macOS"' \
    --header 'sec-fetch-dest: empty' \
    --header 'sec-fetch-mode: cors' \
    --header 'sec-fetch-site: same-origin' \
    --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36' \
    --data '{
        "RequestInfo": {
            "apiId": "Rainmaker",
            "authToken": "c60cda91-a143-4311-9c76-6ff91926c23d",
            "userInfo": {
                "id": 922,
                "uuid": "45614d29-9a50-4970-aba5-81b380745f48",
                "userName": "ANSH-001",
                "name": "Ansh",
                "mobileNumber": "9876543210",
                "emailId": null,
                "type": "EMPLOYEE",
                "roles": [
                    {
                        "name": "HRMS Admin",
                        "code": "HRMS_ADMIN",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "WORK ORDER CREATOR",
                        "code": "WORK_ORDER_CREATOR",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "ESTIMATE VERIFIER",
                        "code": "ESTIMATE_VERIFIER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "ESTIMATE APPROVER",
                        "code": "ESTIMATE_APPROVER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MB_VERIFIER",
                        "code": "MB_VERIFIER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "WORK ORDER VERIFIER",
                        "code": "WORK_ORDER_VERIFIER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "PROJECT VIEWER",
                        "code": "PROJECT_VIEWER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MB_CREATOR",
                        "code": "MB_CREATOR",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MUSTER ROLL VERIFIER",
                        "code": "MUSTER_ROLL_VERIFIER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "OFFICER IN CHARGE",
                        "code": "OFFICER_IN_CHARGE",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "PROJECT CREATOR",
                        "code": "PROJECT_CREATOR",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "Employee Common",
                        "code": "EMPLOYEE_COMMON",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "BILL_VIEWER",
                        "code": "BILL_VIEWER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "TECHNICAL SANCTIONER",
                        "code": "TECHNICAL_SANCTIONER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "BILL_CREATOR",
                        "code": "BILL_CREATOR",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MUSTER ROLL APPROVER",
                        "code": "MUSTER_ROLL_APPROVER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "ESTIMATE VIEWER",
                        "code": "ESTIMATE_VIEWER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "WORK ORDER APPROVER",
                        "code": "WORK_ORDER_APPROVER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MB_APPROVER",
                        "code": "MB_APPROVER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "ESTIMATE CREATOR",
                        "code": "ESTIMATE_CREATOR",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MB_VIEWER",
                        "code": "MB_VIEWER",
                        "tenantId": "pg.citya"
                    },
                    {
                        "name": "MUKTA Admin",
                        "code": "MUKTA_ADMIN",
                        "tenantId": "pg.citya"
                    }
                ],
                "tenantId": "pg.citya"
            },
            "msgId": "1687176345894|en_IN",
            "plainAccessRequest": {}
        }
    }'

Contracts migration

// For first contract
UPDATE eg_wms_contract_line_items
SET contract_line_item_ref = eg_wms_contract_line_items.id
FROM eg_wms_contract
WHERE eg_wms_contract_line_items.contract_id = eg_wms_contract.id
      AND (eg_wms_contract.business_service IS NULL OR eg_wms_contract.business_service = 'CONTRACT');

// For revised contracts
UPDATE eg_wms_contract_line_items AS t1
SET contract_line_item_ref = (
    SELECT contract_line_item_ref
    FROM eg_wms_contract_line_items AS t2
    WHERE t2.estimate_id = t1.estimate_id
      AND t2.estimate_line_item_id = t1.estimate_line_item_id
      AND t2.contract_line_item_ref IS NOT NULL
    LIMIT 1
)
WHERE t1.contract_line_item_ref IS NULL;

UPDATE eg_wms_contract SET version_number=version_number+1 WHERE business_service='CONTRACT-REVISION';

UPDATE eg_wms_contract SET business_service='CONTRACT' WHERE business_service is null;

UPDATE eg_wms_contract SET version_number=1 WHERE business_service ='CONTRACT';
branch of the organization service
Click here