bogdan-bondar on master
Improve target management (#126… (compare)
Hello all, I want to add a new column last_update
to sp_target
. This column records the timestamp of the last instance of an attribute update. I managed to change the schema and add this column. I also had to change the migration schema (e.g., V1_11_0__init__MYSQL.sql
) to include this column (otherwise, I get an error when loading the Management UI that this column name is not found). I can get hawkBit to work with an empty database.
When I run this hawkBit instance with an existing MySQL database, I get a org.flywaydb.core.api.FlywayException: Validate failed: Migration checksum mismatch for migration version 1.0.1
. Reading up on Flyway, I understand that this is because the tables in schema_version
database of my MySQL schema have different checksums than what I currently have in the hawkBit instance. Existing solutions on the web, e.g., dropping schema_version
does not seem right. How do I proceed? I also get the sense that there is no way to use an existing database with a modified database schema—is this true? Thanks!
@bogdan-bondar and here it is my property file for reference: org.eclipse.hawkbit.repository.s3.bucketName=hawkbit-dev-storage
org.eclipse.hawkbit.artifact.repository.s3.enabled=true
aws.region=us-east-1
#AWS_REGION
spring.jpa.database=MYSQL
spring.datasource.url=jdbc:mysql://mysql/hawkbit
spring.datasource.username=xxxxxxxxxxxxxxx
spring.datasource.password=XXXXXXXXXXXXXXXX
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.security.user.name=admin
spring.security.user.password={noop}abc123!
spring.main.allow-bean-definition-overriding=true
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.enabled=true
server.servlet.encoding.force=true
hawkbit.server.ddi.security.authentication.anonymous.enabled=true
hawkbit.server.ddi.security.authentication.targettoken.enabled=false
hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=false
hawkbit.server.repository.publish-target-poll-event=true
server.hostname=$HOSTNAME
hawkbit.server.ddi.security.authentication.anonymous.enabled=true
server.port=8443
hawkbit.artifact.url.protocols.download-http.protocol=https
hawkbit.artifact.url.protocols.download-http.port=8443
hawkbit.server.security.require-ssl=true
security.require-ssl=true
server.use-forward-headers=true
server.ssl.key-store=/home/hb-pass.jks
server.ssl.key-store-type=JKS
server.ssl.key-password=XXXXXX
server.ssl.key-store-password=XXXXXX
server.ssl.protocol=TLS
server.ssl.enabled-protocols=TLSv1.2
server.ssl.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
spring.rabbitmq.virtual-host=/
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.servlet.multipart.max-file-size=3073741824
spring.servlet.multipart.max-request-size=3073741824
hawkbit.server.security.dos.maxArtifactSize=3073741824
db: hawkbit
Command: Query
Time: 0
State: executing
Info: SELECT DISTINCT t1.id AS a1, t1.tenant AS a2, t1.address AS a3, t1.controller_id AS a4, t1.created_at AS a5, t1.created_by AS a6, t1.description AS a7, t1.install_date AS a8, t1.last_modified_at AS a9, t1.last_modified_by AS a10, t1.last_target_query AS a11, t1.name AS a12, t1.optlock_revision AS a13, t1.request_controller_attributes AS a14, t1.sec_token AS a15, t1.update_status AS a16, t1.assigned_distribution_set AS a17, t1.installed_distribution_set AS a18, t1.target_type AS a19 FROM sp_target t1 LEFT OUTER JOIN sp_action t0 ON ((t0.target = t1.id) AND (t0.distribution_set = 44)) WHERE (((UPPER(t1.controller_id) LIKE 'BN-%' ESCAPE '\' AND (t1.created_at > 1642395600000)) AND (t0.id IS NULL)) AND (t1.tenant = 'DEFAULT')) LIMIT 0, 999
deployment.chunks[].artifacts[]._links.download
?
docker run -p 8080:8080 hawkbit/hawkbit-update-server:latest