@Test public void testApply() { try (ODatabaseDocumentTx securityDb = securityDatabase.getInstance().connect()) { createUser(ADMIN_USER, ADMIN_PASS); } underTest.apply(); assertAdminUserStatus(USER_CHANGEPASSWORD); }
@Override public void apply() { withDatabaseAndClass(securityDatabaseInstance, DB_CLASS, (db, type) -> { int updates = db.command(new OCommandSQL(QUERY)).execute(ADMIN_PASS); if (updates > 0) { log.info("Updated admin user status to 'changepassword'."); } }); }
SecurityDatabaseUpgrade_1_2 extends DatabaseUpgradeSupport { @Override public void apply() { withDatabaseAndClass(securityDatabaseInstance, DB_CLASS, (db, type) -> { int updates = db.command(new OCommandSQL(QUERY)).execute(ADMIN_PASS); if (updates > 0) { log.info("Updated admin user status to 'changepassword'."); } }); } }
SecurityDatabaseUpgrade_1_2 extends DatabaseUpgradeSupport { @Override public void apply() { withDatabaseAndClass(securityDatabaseInstance, DB_CLASS, (db, type) -> { int updates = db.command(new OCommandSQL(QUERY)).execute(ADMIN_PASS); if (updates > 0) { log.info("Updated admin user status to 'changepassword'."); } }); } @Inject  SecurityDatabaseUpgrade_1_2(@Named(DatabaseInstanceNames.SECURITY) final Provider<DatabaseInstance> securityDatabaseInstance); }
SecurityDatabaseUpgrade_1_2 extends DatabaseUpgradeSupport { @Override public void apply() { withDatabaseAndClass(securityDatabaseInstance, DB_CLASS, (db, type) -> { int updates = db.command(new OCommandSQL(QUERY)).execute(ADMIN_PASS); if (updates > 0) { log.info("Updated admin user status to 'changepassword'."); } }); } @Inject  SecurityDatabaseUpgrade_1_2(@Named(DatabaseInstanceNames.SECURITY) final Provider<DatabaseInstance> securityDatabaseInstance); @Override void apply(); }
SecurityDatabaseUpgrade_1_2 extends DatabaseUpgradeSupport { @Override public void apply() { withDatabaseAndClass(securityDatabaseInstance, DB_CLASS, (db, type) -> { int updates = db.command(new OCommandSQL(QUERY)).execute(ADMIN_PASS); if (updates > 0) { log.info("Updated admin user status to 'changepassword'."); } }); } @Inject  SecurityDatabaseUpgrade_1_2(@Named(DatabaseInstanceNames.SECURITY) final Provider<DatabaseInstance> securityDatabaseInstance); @Override void apply();  }