Code Monkey home page Code Monkey logo

Comments (12)

himeshr avatar himeshr commented on September 15, 2024
  • Add query to update the version of all voided(independent of allow is true or false) to 0 and non-voided to 1

@mahalakshme Will not do this part as per discussion in Avni product group

from avni-server.

mahalakshme avatar mahalakshme commented on September 15, 2024

@himeshr no Joy mentioned so, because of AC for his card. It will all work together correctly

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

@himeshr no Joy mentioned so, because of AC for his card. It will all work together correctly

As per discussion, will update impl_version instead of earlier mentioned version column in group_privilege table.

~Depends on #721 ~

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

templateExpressionToGenerateUpdateScript.txt

Used this to auto-generate the sql script for all org-sheets mentioned in this card's description. update script sheet

from avni-server.

1t5j0y avatar 1t5j0y commented on September 15, 2024

the manually run script (created via this card) should only update is_voided (and get the db to a valid state where we can apply the constraint). Updating impl_version also here creates a circular dependency.

the migration (in #721) will introduce the new impl_version column, mark all voided rows with impl_version 0 and add the constraint.

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

the manually run script (created via this card) should only update is_voided (and get the db to a valid state where we can apply the constraint). Updating impl_version also here creates a circular dependency.

the migration (in #721) will introduce the new impl_version column, mark all voided rows with impl_version 0 and add the constraint.

Updated the script to not set the impl_version, and just retain 1 non-voided entry as part of the update script.

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

Commands to find duplicate ids.txt
WIP: query to void all duplicates after setting allow to false

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

Local testing on pre-release for "Mobile Creches" org was successful, with following sql commands executed and output recieved.
sqlOutputMobileCrechesRemovalOfDuplicatePrivileges.txt
mobileCrechesRemovalOfDuplicatePrivileges.txt

from avni-server.

petmongrels avatar petmongrels commented on September 15, 2024

For QA

  • the scripts will need to be run on production
  • testing and verification should be done in prerelease environment. When verifying we should verify whether the privileges for users are same as they are in production. This is required because the privileges will get updated when the deployment is done for this.
  • It would be good to refresh pre-release before testing this (we should make sure that the downtime doesn't block other people)

from avni-server.

mahalakshme avatar mahalakshme commented on September 15, 2024

@himeshr

  • check this comment
  • I have updated the privileges with discrepancies for all active organisations here in the sheet: 'For all active orgs with discrepancies'.
  • The privileges with discrepancies have changed. So I have used the same formula in the above sheet.
  • In the 'Active orgs' sheet have added the final list of active orgs that have discrepancies.

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

Migration script available here

from avni-server.

himeshr avatar himeshr commented on September 15, 2024

Executed the group privileges updation script in production.
ProdSqlsLogs.txt
ProdSqlsExecuted.txt

from avni-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.