From f247b66e29dd8427939301718365bc65e1249b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Thu, 18 Jul 2024 15:07:34 +0000 Subject: [PATCH 01/15] [maven-release-plugin] prepare release webapp-2.4.18 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8104e9540..045b47393 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ai.elimu webapp war - 2.4.18-SNAPSHOT + 2.4.18 11 @@ -142,7 +142,7 @@ scm:git:git@github.com:elimu-ai/webapp.git scm:git:https://github.com/elimu-ai/webapp.git https://github.com/elimu-ai/webapp - HEAD + webapp-2.4.18 From b895e9d6dddc5eee17356d0877456b10479bddd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Thu, 18 Jul 2024 15:07:36 +0000 Subject: [PATCH 02/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 045b47393..44477a05e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ai.elimu webapp war - 2.4.18 + 2.4.19-SNAPSHOT 11 @@ -142,7 +142,7 @@ scm:git:git@github.com:elimu-ai/webapp.git scm:git:https://github.com/elimu-ai/webapp.git https://github.com/elimu-ai/webapp - webapp-2.4.18 + HEAD From f0627d3920ca76272ba7683d24153d60b39380f7 Mon Sep 17 00:00:00 2001 From: Himadri Mandal Date: Fri, 19 Jul 2024 00:35:43 +0530 Subject: [PATCH 03/15] removed PropertyPlaceholderConfigurer and added PropertySourcesPlaceholderConfigurer. --- .../EnvironmentContextLoaderListener.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/main/java/ai/elimu/web/context/EnvironmentContextLoaderListener.java b/src/main/java/ai/elimu/web/context/EnvironmentContextLoaderListener.java index 2b49e682b..fe3363d32 100644 --- a/src/main/java/ai/elimu/web/context/EnvironmentContextLoaderListener.java +++ b/src/main/java/ai/elimu/web/context/EnvironmentContextLoaderListener.java @@ -10,10 +10,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.Logger; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.io.Resource; import org.springframework.web.context.ConfigurableWebApplicationContext; import org.springframework.web.context.ContextLoaderListener; @@ -140,16 +137,9 @@ protected void customizeContext(ServletContext servletContext, ConfigurableWebAp } } - PropertyPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertyPlaceholderConfigurer(); - propertyPlaceholderConfigurer.setProperties(PROPERTIES); - applicationContext.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { - @Override - public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException { - PropertyPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertyPlaceholderConfigurer(); - propertyPlaceholderConfigurer.setProperties(PROPERTIES); - propertyPlaceholderConfigurer.postProcessBeanFactory(configurableListableBeanFactory); - } - }); + PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); + propertySourcesPlaceholderConfigurer.setProperties(PROPERTIES); + applicationContext.addBeanFactoryPostProcessor(propertySourcesPlaceholderConfigurer); } // Add all supported languages From 735e3508c9acda42615484a05beb55c8d3718cf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:01:00 +0000 Subject: [PATCH 04/15] chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.8 to 0.8.12 Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.8 to 0.8.12. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.8...v0.8.12) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8104e9540..55fb7c11e 100644 --- a/pom.xml +++ b/pom.xml @@ -90,7 +90,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.12 From 498a8b2087d523f9fbc5682bd634f7125d31bee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Tue, 23 Jul 2024 13:03:12 +0000 Subject: [PATCH 05/15] [maven-release-plugin] prepare release webapp-2.4.19 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2a132040b..3670ada70 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ai.elimu webapp war - 2.4.19-SNAPSHOT + 2.4.19 11 @@ -142,7 +142,7 @@ scm:git:git@github.com:elimu-ai/webapp.git scm:git:https://github.com/elimu-ai/webapp.git https://github.com/elimu-ai/webapp - HEAD + webapp-2.4.19 From e8310c35d648885a69af7b933248b185c56ee881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Tue, 23 Jul 2024 13:03:14 +0000 Subject: [PATCH 06/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3670ada70..4a979b81a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ai.elimu webapp war - 2.4.19 + 2.4.20-SNAPSHOT 11 @@ -142,7 +142,7 @@ scm:git:git@github.com:elimu-ai/webapp.git scm:git:https://github.com/elimu-ai/webapp.git https://github.com/elimu-ai/webapp - webapp-2.4.19 + HEAD From 5e80084edcf13431e407bbee8c8f3c90a2e817fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Tue, 23 Jul 2024 20:27:01 +0700 Subject: [PATCH 07/15] Delete FUNDING_SPLITS_HIN.csv Replaced by https://github.com/elimu-ai/web3-wiki/blob/main/funding-splits/content/FUNDING_SPLITS_HIN.csv --- FUNDING_SPLITS_HIN.csv | 88 ------------------------------------------ 1 file changed, 88 deletions(-) delete mode 100644 FUNDING_SPLITS_HIN.csv diff --git a/FUNDING_SPLITS_HIN.csv b/FUNDING_SPLITS_HIN.csv deleted file mode 100644 index e2ffe6d21..000000000 --- a/FUNDING_SPLITS_HIN.csv +++ /dev/null @@ -1,88 +0,0 @@ -ethereum_address,contributor_id,impact_percentage -0x0000000000000000000000000000000000000000,1,58.075221238938056 -0x754a9162678eaae9b8949eebd85ed1936b5abce3,2,4.314159292035399 -0x0000000000000000000000000000000000000000,3,0.0 -0x0000000000000000000000000000000000000000,5,0.0 -0x0000000000000000000000000000000000000000,6,0.0 -0x0000000000000000000000000000000000000000,7,0.0 -0x0000000000000000000000000000000000000000,8,0.0 -0xec35e628dbf08ae096addb187a485e01d39e7560,9,0.22123893805309736 -0x0000000000000000000000000000000000000000,10,0.0 -0x0000000000000000000000000000000000000000,11,0.0 -0x0fa31ed0fa8e2d2a958b5b5d3c9e9b565abe3e93,12,0.0 -0x2fab1fa377cb2631f0bb002fbcd0178819cd33ac,13,0.0 -0x0000000000000000000000000000000000000000,14,0.11061946902654868 -0x720a4007fd5f34ce15cbe2c1021a846e848ff122,15,0.0 -0xd534905ba9e52f7b945c5c14e68ac3e823aa30ba,16,0.0 -0x0000000000000000000000000000000000000000,17,0.0 -0x0000000000000000000000000000000000000000,18,0.0 -0x8f926b0dbe4fcc8678eb3f25e53d1a87fcc7c104,19,0.0 -0x28bab36faf041f5b66b0bc5849e7269a752d1747,20,0.0 -0x08379a244ab375c32033578b78a1512fb25a5062,21,0.0 -0x7275dc2a973a98cefc7bad3227edd98a0432bdae,22,0.0 -0x0000000000000000000000000000000000000000,23,2.2123893805309733 -0x626ae4a918baf6e26f3b3e6b7cf97eec404ffc8b,24,0.0 -0x0000000000000000000000000000000000000000,25,0.0 -0xc35fc3319e9ca191cec422a426b0dcc20abc984a,26,0.0 -0xfbf1de2c211960a95ca254e5af5d80c8fe29aaf0,27,0.0 -0x0000000000000000000000000000000000000000,28,0.0 -0x0000000000000000000000000000000000000000,29,0.0 -0x361dd9c707325d40abfb3ec72518585fd7b76199,30,0.0 -0x0000000000000000000000000000000000000000,31,0.0 -0x0000000000000000000000000000000000000000,32,0.0 -0xda0bc9ecd14d0346ee41085edbc46a950bebd73d,33,2.6548672566371683 -0x520176597aedf15a05445ad87a477325685544f8,34,0.0 -0x0000000000000000000000000000000000000000,35,0.0 -0x67b2b26b1186a41e422c490b62c6a3a17cc13779,36,0.0 -0x37fcb9a179247bcea473ac27404a6e50e22ebed9,37,2.9867256637168142 -0x95ba792b6eeb140625625083fa045e766c78173b,38,6.3053097345132745 -0x9f954bcd8bc1b114dfa0296a68a4744603c8e649,39,0.995575221238938 -0x0000000000000000000000000000000000000000,40,0.0 -0x8f866f04efdf1f1427625bffb0fa8677b08ee04d,41,20.6858407079646 -0xad97fab3787527b7d280dedb1f5053106e2d5500,42,0.0 -0xd9b290431c259d0cb3e3ea55c477ea3d62f8e6fd,43,0.22123893805309736 -0x0000000000000000000000000000000000000000,44,0.0 -0x0000000000000000000000000000000000000000,45,0.0 -0x0000000000000000000000000000000000000000,46,0.0 -0x0000000000000000000000000000000000000000,47,0.0 -0x0000000000000000000000000000000000000000,48,0.0 -0x07a721260416e764618b059811eaf099a940af14,49,0.0 -0x0000000000000000000000000000000000000000,50,0.0 -0x0000000000000000000000000000000000000000,51,0.0 -0x0000000000000000000000000000000000000000,52,0.0 -0x0000000000000000000000000000000000000000,53,0.0 -0x0000000000000000000000000000000000000000,54,0.0 -0x2bf034eccebc8cd60dab9c249b6c2996dcb7d8ec,55,0.0 -0xece7c7a2524fd3c08a351134f101794dbfc96b0d,56,0.0 -0x8e6122437026cb35066f19449f4c1003a34b28df,57,0.0 -0x7cba4b76fe2d68816bef9ba64f1f2d10907834ca,58,0.11061946902654868 -0x860b68c636c8cdff2617ec62611372cff57d60bc,59,0.0 -0x59f1202ee4a967183598ad45c23459107d5accd6,60,0.0 -0xbbfa66d9f0e6c8a75793b9b9ff094b2fc753e20c,61,0.0 -0x74f8423e4935c2d988be41306d874f8bd5080403,62,0.22123893805309736 -0x0000000000000000000000000000000000000000,63,0.0 -0x0000000000000000000000000000000000000000,64,0.0 -0x3ca0882a262cf7d5b38b31697371b7f4480a9385,65,0.22123893805309736 -0xaef4842a2c6f44ed2d8c4bff94451126d79a065e,66,0.0 -0x0000000000000000000000000000000000000000,67,0.0 -0x69b18e301ce3eea9be5296f941f6d6c7600c1698,68,0.0 -0x272ac3aab962c84c3073b47a85b6d5c5ff6fab99,69,0.0 -0x0000000000000000000000000000000000000000,79,0.0 -0x0000000000000000000000000000000000000000,70,0.0 -0x29a3905c0606dfa2add4139d681b191d942020c8,71,0.0 -0x0000000000000000000000000000000000000000,72,0.0 -0x0000000000000000000000000000000000000000,73,0.0 -0x0000000000000000000000000000000000000000,74,0.0 -0x0000000000000000000000000000000000000000,75,0.0 -0x0000000000000000000000000000000000000000,76,0.0 -0xb0dea5cef77956cf3cb6d3bbdb6af244b357d9f9,77,0.22123893805309736 -0x0000000000000000000000000000000000000000,78,0.0 -0x0000000000000000000000000000000000000000,80,0.0 -0x20d5307af7eefd5398e798c71e3da6e442136be9,81,0.0 -0xbbb833115a3498c45bffc9e59e3b59a5995c2ca8,82,0.0 -0x0000000000000000000000000000000000000000,83,0.0 -0x0000000000000000000000000000000000000000,84,0.0 -0x0000000000000000000000000000000000000000,85,0.0 -0xa6d4fef3c1337cae47469b1b1a7068ec8688e819,86,0.4424778761061947 -0x513dcee2929a6e0cd115fb65ec926d6569d98aff,87,0.0 -0xfcf315d7ca229733acbcafcad2b7c96cd5c51da7,88,0.0 From c0757e4434bbef0ecc5318c8e71c88049ed72171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Tue, 23 Jul 2024 20:34:49 +0700 Subject: [PATCH 08/15] Delete FUNDING_SPLITS_TGL.csv Replaced by https://github.com/elimu-ai/web3-wiki/blob/main/funding-splits/content/FUNDING_SPLITS_TGL.csv --- FUNDING_SPLITS_TGL.csv | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 FUNDING_SPLITS_TGL.csv diff --git a/FUNDING_SPLITS_TGL.csv b/FUNDING_SPLITS_TGL.csv deleted file mode 100644 index 776b013e9..000000000 --- a/FUNDING_SPLITS_TGL.csv +++ /dev/null @@ -1,25 +0,0 @@ -ethereum_address,contributor_id,impact_percentage -0x0000000000000000000000000000000000000000,1,59.345794392523366 -0x0000000000000000000000000000000000000000,2,0.0 -0x0000000000000000000000000000000000000000,3,0.0 -0x0000000000000000000000000000000000000000,4,0.0 -0x0000000000000000000000000000000000000000,5,0.0 -0xa8a4f4c8e76974ad3465e793d54fa2392338da1b,6,2.4922118380062304 -0x0000000000000000000000000000000000000000,7,0.0 -0x0000000000000000000000000000000000000000,8,0.0 -0xd231cbea9397ba77806176a6c85ace73e45c91f2,9,22.585669781931465 -0x39bb57b112f459f6636fcb7bd87d8acce408e12a,10,12.77258566978193 -0x81d80e6c2d30a7e10a1ae2271f6e978dc99d4bf9,11,0.0 -0x0000000000000000000000000000000000000000,12,0.0 -0xcdc6dbfbb4755d82c90166b79063b5881906b48e,17,2.803738317757009 -0x59f1202ee4a967183598ad45c23459107d5accd6,18,0.0 -0x0000000000000000000000000000000000000000,15,0.0 -0x0000000000000000000000000000000000000000,19,0.0 -0x0000000000000000000000000000000000000000,20,0.0 -0x0000000000000000000000000000000000000000,21,0.0 -0x0000000000000000000000000000000000000000,22,0.0 -0x0000000000000000000000000000000000000000,23,0.0 -0xcec0e2214d43f8245c1302904c02d666fc65e6bc,24,0.0 -0x5eb194eba98c028fb9625fb18f392497ddb5d144,25,0.0 -0x92ad2bf2c30b0250188d4156da5628c0d524ae9b,26,0.0 -0xafac34fb316fe797f775898d2dfb6157815ffedc,27,0.0 From f5ae346e263e89f4ee247c803434550620be3b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Tue, 23 Jul 2024 20:52:20 +0700 Subject: [PATCH 09/15] Update FUNDING_SPLITS.csv --- FUNDING_SPLITS.csv | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/FUNDING_SPLITS.csv b/FUNDING_SPLITS.csv index 70b1b8649..d89ecaa4d 100644 --- a/FUNDING_SPLITS.csv +++ b/FUNDING_SPLITS.csv @@ -1,11 +1,21 @@ ethereum_address,github_username,impact_percentage -0x5D388Ec24Cc2C0C77458338696aa63AFB706A7b1,nya-elimu,49.39 -0xd46Cc93E3eE6a4fb532D9B48E95be7eD8f8f1DA0,jo-elimu,39.00 -0x3965d420cde24fe00f742cb31257ca90e04556a7,tomaszsmy,1.14 -0x819e4F5E912abb36c8f6c03790e7508e03cc37a3,UmenR,1.08 -0x342FaeB14127A79735144bbdC772AbB6b1bBe343,coderabbitai,1.05 -0x5367a6d4F5991327Bb20466684790e394bE000dE,Shubham-Vishwakarma,0.73 -0x0000000000000000000000000000000000000000,aschworer,0.70 -0x513DceE2929a6e0CD115fb65Ec926d6569d98aff,venkatesh2k3,0.58 -0x4709ebf314c6492d57f4c6d4f57357d5b2bb074e,vrudas,0.55 -0x914dBEe36BcAb63B2D15fAED08839Be43797b421,hhio618,0.55 +0x5D388Ec24Cc2C0C77458338696aa63AFB706A7b1,nya-elimu,47.52 +0xd46Cc93E3eE6a4fb532D9B48E95be7eD8f8f1DA0,jo-elimu,39.09 +0x342FaeB14127A79735144bbdC772AbB6b1bBe343,coderabbitai,2.48 +0x3965d420cde24fe00f742cb31257ca90e04556a7,tomaszsmy,1.07 +0x819e4F5E912abb36c8f6c03790e7508e03cc37a3,UmenR,1.01 +0x513DceE2929a6e0CD115fb65Ec926d6569d98aff,venkatesh2k3,0.69 +0x5367a6d4F5991327Bb20466684790e394bE000dE,Shubham-Vishwakarma,0.68 +0x0000000000000000000000000000000000000000,aschworer,0.65 +0x4709ebf314c6492d57f4c6d4f57357d5b2bb074e,vrudas,0.54 +0x914dBEe36BcAb63B2D15fAED08839Be43797b421,hhio618,0.52 +0x0000000000000000000000000000000000000000,urosht,0.51 +0x78888390AA08D9A25f3BDB8A1B35351D7c7F8a12,Bender-22,0.42 +0x914dBEe36BcAb63B2D15fAED08839Be43797b421,watr-sheep,0.34 +0x0000000000000000000000000000000000000000,eymaal,0.32 +0x0000000000000000000000000000000000000000,jpatel3,0.31 +0x0000000000000000000000000000000000000000,Keerthi4308,0.31 +0x0000000000000000000000000000000000000000,alexander-kuruvilla,0.29 +0x0000000000000000000000000000000000000000,SnehaHS65,0.27 +0x0000000000000000000000000000000000000000,vuriaval,0.26 +0x0000000000000000000000000000000000000000,SamehNoukary,0.25 From 3a9ee99f44c2cd2428e861bd12c8930602f2347a Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 23 Jul 2024 20:53:51 +0530 Subject: [PATCH 10/15] updated deviceId and its references to androidId --- src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java | 6 +++--- src/main/java/ai/elimu/model/Device.java | 10 +++++----- src/main/resources/db/migration/2004019.sql | 5 +++++ src/test/java/ai/elimu/dao/DeviceDaoTest.java | 8 ++++---- 4 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/db/migration/2004019.sql diff --git a/src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java b/src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java index 7a22d872e..24974ec5d 100644 --- a/src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java +++ b/src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java @@ -10,13 +10,13 @@ public class DeviceDaoJpa extends GenericDaoJpa implements DeviceDao { @Override - public Device read(String deviceId) throws DataAccessException { + public Device read(String androidId) throws DataAccessException { try { return (Device) em.createQuery( "SELECT d " + "FROM Device d " + - "WHERE d.deviceId = :deviceId") - .setParameter("deviceId", deviceId) + "WHERE d.androidId = :androidId") + .setParameter("androidId", androidId) .getSingleResult(); } catch (NoResultException e) { return null; diff --git a/src/main/java/ai/elimu/model/Device.java b/src/main/java/ai/elimu/model/Device.java index 90a526fe4..30450cb38 100644 --- a/src/main/java/ai/elimu/model/Device.java +++ b/src/main/java/ai/elimu/model/Device.java @@ -12,7 +12,7 @@ public class Device extends BaseEntity { @NotNull @Column(unique=true) - private String deviceId; + private String androidId; @NotNull private String deviceManufacturer; @@ -33,12 +33,12 @@ public class Device extends BaseEntity { @NotNull private Integer osVersion; - public String getDeviceId() { - return deviceId; + public String getAndroidId() { + return androidId; } - public void setDeviceId(String deviceId) { - this.deviceId = deviceId; + public void setAndroidId(String androidId) { + this.androidId = androidId; } public String getDeviceManufacturer() { diff --git a/src/main/resources/db/migration/2004019.sql b/src/main/resources/db/migration/2004019.sql new file mode 100644 index 000000000..95fe205d1 --- /dev/null +++ b/src/main/resources/db/migration/2004019.sql @@ -0,0 +1,5 @@ +ALTER TABLE `Device` DROP COLUMN `deviceId`; +ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); + +ALTER TABLE `Device` DROP INDEX `UK_ktkbd0xm3q2nddw1xxtdaxjy7`; +ALTER TABLE `Device` ADD CONSTRAINT `UK_ktkbd0xm3q2nddw1xxtdaxjy7` UNIQUE (`androidId`); \ No newline at end of file diff --git a/src/test/java/ai/elimu/dao/DeviceDaoTest.java b/src/test/java/ai/elimu/dao/DeviceDaoTest.java index 8cf59eecf..20d11969d 100644 --- a/src/test/java/ai/elimu/dao/DeviceDaoTest.java +++ b/src/test/java/ai/elimu/dao/DeviceDaoTest.java @@ -22,14 +22,14 @@ public void testRead() { deviceDao.create(getDevice("22")); deviceDao.create(getDevice("44")); - assertEquals("22", deviceDao.read("22").getDeviceId()); - assertEquals("44", deviceDao.read("44").getDeviceId()); + assertEquals("22", deviceDao.read("22").getAndroidId()); + assertEquals("44", deviceDao.read("44").getAndroidId()); assertNull(deviceDao.read("33")); } - private Device getDevice(String deviceId) { + private Device getDevice(String androidId) { Device device = new Device(); - device.setDeviceId(deviceId); + device.setAndroidId(androidId); return device; } } From d8d7a134da28b7dfd29037189941ee9fd4a4a965 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 23 Jul 2024 20:55:04 +0530 Subject: [PATCH 11/15] added comment for release number in the migration script --- src/main/resources/db/migration/2004019.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/db/migration/2004019.sql b/src/main/resources/db/migration/2004019.sql index 95fe205d1..23afd1a81 100644 --- a/src/main/resources/db/migration/2004019.sql +++ b/src/main/resources/db/migration/2004019.sql @@ -1,3 +1,4 @@ +# 2.4.19 ALTER TABLE `Device` DROP COLUMN `deviceId`; ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); From 15097ee52660ba7b7c030a8bc8e61049bf898d21 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 23 Jul 2024 21:00:20 +0530 Subject: [PATCH 12/15] schema update on mvn jetty:run --- src/main/resources/META-INF/jpa-schema-export.sql | 4 ++-- src/main/resources/db/migration/2004019.sql | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/resources/META-INF/jpa-schema-export.sql b/src/main/resources/META-INF/jpa-schema-export.sql index eea1e2c73..a2572f367 100644 --- a/src/main/resources/META-INF/jpa-schema-export.sql +++ b/src/main/resources/META-INF/jpa-schema-export.sql @@ -255,7 +255,7 @@ create table Device ( id bigint not null auto_increment, - deviceId varchar(255), + androidId varchar(255), deviceManufacturer varchar(255), deviceModel varchar(255), deviceSerial varchar(255), @@ -695,7 +695,7 @@ add constraint UK_gdl53lyf9qvi56fmbrk9nfrg9 unique (version); alter table Device - add constraint UK_ktkbd0xm3q2nddw1xxtdaxjy7 unique (deviceId); + add constraint UK_c2646199whiqrkjbht7hwyr3v unique (androidId); alter table Application add constraint FKn1pft600om9qs7dn754chjk67 diff --git a/src/main/resources/db/migration/2004019.sql b/src/main/resources/db/migration/2004019.sql index 23afd1a81..0160bf9bf 100644 --- a/src/main/resources/db/migration/2004019.sql +++ b/src/main/resources/db/migration/2004019.sql @@ -1,6 +1,3 @@ # 2.4.19 ALTER TABLE `Device` DROP COLUMN `deviceId`; -ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); - -ALTER TABLE `Device` DROP INDEX `UK_ktkbd0xm3q2nddw1xxtdaxjy7`; -ALTER TABLE `Device` ADD CONSTRAINT `UK_ktkbd0xm3q2nddw1xxtdaxjy7` UNIQUE (`androidId`); \ No newline at end of file +ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); \ No newline at end of file From d4d295636329d0523f415134e295127237ea9795 Mon Sep 17 00:00:00 2001 From: alexander-kuruvilla <43273583+alexander-kuruvilla@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:12:29 +0530 Subject: [PATCH 13/15] Update src/main/resources/db/migration/2004019.sql Co-authored-by: Jo G. <1451036+jo-elimu@users.noreply.github.com> --- src/main/resources/db/migration/2004019.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/db/migration/2004019.sql b/src/main/resources/db/migration/2004019.sql index 0160bf9bf..3d3f89463 100644 --- a/src/main/resources/db/migration/2004019.sql +++ b/src/main/resources/db/migration/2004019.sql @@ -1,3 +1,3 @@ -# 2.4.19 +# 2.4.20 ALTER TABLE `Device` DROP COLUMN `deviceId`; ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); \ No newline at end of file From 2b0f2158a661cc0b67e41833a5226de153428ddc Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 23 Jul 2024 21:16:38 +0530 Subject: [PATCH 14/15] deviceId updated in DeviceDao --- src/main/java/ai/elimu/dao/DeviceDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ai/elimu/dao/DeviceDao.java b/src/main/java/ai/elimu/dao/DeviceDao.java index 482c2543c..a5934039b 100644 --- a/src/main/java/ai/elimu/dao/DeviceDao.java +++ b/src/main/java/ai/elimu/dao/DeviceDao.java @@ -6,5 +6,5 @@ public interface DeviceDao extends GenericDao { - Device read(String deviceId) throws DataAccessException; + Device read(String androidId) throws DataAccessException; } From eee62819c1de93f9bb362811bd9d41037140996d Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 23 Jul 2024 21:18:19 +0530 Subject: [PATCH 15/15] rename database migration file from 2004019.sql to 2004020.sql --- src/main/resources/db/migration/{2004019.sql => 2004020.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{2004019.sql => 2004020.sql} (100%) diff --git a/src/main/resources/db/migration/2004019.sql b/src/main/resources/db/migration/2004020.sql similarity index 100% rename from src/main/resources/db/migration/2004019.sql rename to src/main/resources/db/migration/2004020.sql