This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Start metabase | |
export MB_DB_TYPE=postgres | |
export MB_DB_DBNAME=avni_metabase | |
export MB_DB_PORT=5432 | |
export MB_DB_USER=reporting_user | |
export MB_DB_PASS=password | |
export MB_DB_HOST=localhost | |
java -jar metabase.jar | |
# 2. Restore organisation data to database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to reproduce the issue (program enrolment is used as example, it will happen with all entities) | |
1. Start with old schema database (181) on the client and then start with new version of the app (185, 7.0.x). | |
2. Let the migration run for a few seconds into the ProgramEncounter migration. | |
3. make stop_app | |
4. make open_db (see the obs in program enrolments are empty) and the schema for it is Embedded. | |
5. make start_app (see the schema version is 181) and migration runs again but it fails to make program enrolments observations non empty. | |
Reason. | |
In step 2 we do commit transaction. This commits the new (185) schema changes but not the schema version. Due the commit realm file gets changed. This was verified by throwing an error before transaction commit and open_db, the schema is not migrated in that case and data is all there. So because the schema gets changed, the observations becomes empty - treated like a new field. | |
In step 5 since the realm file has already changes the migration doesn't do anything fo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.springframework.orm.jpa.JpaSystemException: could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement | |
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:314) | |
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225) | |
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:507) | |
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) | |
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) | |
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) | |
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.RuntimeException: java.lang.NullPointerException: fooFoo | |
at org.avni.server.util.ExceptionUtilTest.getFullStackTrace(ExceptionUtilTest.java:14) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:498) | |
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) | |
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | |
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) | |
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.avni.server.util.ExceptionUtilTest.foo(ExceptionUtilTest.java:26) | |
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
java.lang.reflect.Method.invoke(Method.java:498) | |
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) | |
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) | |
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) | |
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) | |
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Add beneficiary to bank account | |
repeat 1 times | |
delay 5 | |
tell application "System Events" to keystroke "783432892348" | |
delay 3 | |
tell application "System Events" to keystroke "783432892348" | |
delay 3 | |
tell application "System Events" to keystroke "John Smith" | |
delay 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make fill_text text=$1 | |
sleep 3 | |
make fill_text text=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE="`echo $1 | cut -d':' -f 1`" | |
LINE_NUMBER="`echo $1 | cut -d':' -f 2`" | |
open -na "IntelliJ IDEA.app" --args --line $LINE_NUMBER $FILE | |
## Also set REACT_EDITOR env variable to this file | |
## if you call this file idea then | |
## export REACT_EDITOR=idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create groups | |
begin transaction; | |
insert into groups (uuid, name, version, organisation_id, created_by_id, last_modified_by_id, created_date_time, last_modified_date_time) | |
(select uuid_generate_v4(), 'Administrators', 1, id, 1, 1, current_timestamp, current_timestamp from organisation where id <> 1 and organisation.is_voided = false); -- 193 | |
-- Without entity specific fields | |
insert into group_privilege (uuid, group_id, privilege_id, subject_type_id, program_id, program_encounter_type_id, encounter_type_id, checklist_detail_id, version, organisation_id, created_by_id, last_modified_by_id, created_date_time, last_modified_date_time) | |
select uuid_generate_v4(), groups.id, privilege.id, null, null, null, null, null, 1, groups.organisation_id, 1, 1, current_timestamp, current_timestamp | |
from privilege join groups on groups.name = 'Administrators' | |
where privilege.entity_type in ('Report', 'NonTransaction', 'Task'); -- 29*193 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG [6:29:08:633] [SelectFormElement::AC][Debug] Dispatching action: "EA.TOGGLE_SINGLESELECT_ANSWER" | |
DEBUG [6:29:08:645] [RuleService][Debug] Getting Rules of Type ViewFilter for Form - Observation Encounter ed2c239a-00ca-439c-8f2b-76543fdc55cf | |
DEBUG [6:29:08:685] [SelectFormElement::AC][Debug] Dispatched action completed: "EA.TOGGLE_SINGLESELECT_ANSWER" | |
DEBUG [6:29:08:691] [SyncComponent][Debug] SHOULD UPDATE | |
DEBUG [6:29:08:721] [ProgressBarView][Debug] SHOULD UPDATE | |
DEBUG [6:29:08:727] [IndividualEncounterView][Debug] render with IndividualUUID=undefined and EncounterTypeUUID=7664eab2-446e-4fc8-ac52-a77c4306893e | |
DEBUG [6:29:08:738] [AppHeader][Debug] SHOULD UPDATE | |
DEBUG [6:29:08:744] [PreviousEncounterPullDownView][Debug] SHOULD UPDATE | |
DEBUG [6:29:08:744] [PreviousEncounterPullDownView][Debug] render | |
DEBUG [6:29:08:745] [IndividualProfile][Debug] SHOULD UPDATE |
NewerOlder