From 2f67258d36bc2569ac3e75fece0bda61cc3aa1f8 Mon Sep 17 00:00:00 2001 From: fnkbsi <> Date: Sun, 24 Dec 2023 14:11:11 +0100 Subject: [PATCH] Merge db migration script V1_0_4 from master --- .../resources/db/migration/V1_0_4__update.sql | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/main/resources/db/migration/V1_0_4__update.sql b/src/main/resources/db/migration/V1_0_4__update.sql index f8ee89d94..762cb027f 100644 --- a/src/main/resources/db/migration/V1_0_4__update.sql +++ b/src/main/resources/db/migration/V1_0_4__update.sql @@ -1,30 +1,2 @@ --- adding tables for multi users access - -CREATE TABLE `webusers` ( - `username` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, - `password` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; - -CREATE TABLE `webauthorities` ( - `username` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, - `authority` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'ROLE_USER', - UNIQUE KEY `authorities_idx_1` (`username`,`authority`), - CONSTRAINT `authorities_ibfk_1` FOREIGN KEY (`username`) REFERENCES `webusers` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; - -CREATE UNIQUE INDEX ix_auth_username - on webauthorities (username,authority); - - --- Insert a user = admin with the password = pass. Change password after installing! -INSERT INTO webusers (username, password, enabled) - values ('admin', - '$2a$10$.Rxx4JnuX8OGJTIOCXn76euuB3dIGHHrkX9tswYt9ECKjAGyms30W', - 1); - -INSERT INTO webauthorities (username, authority) - values ('admin', 'ROLE_ADMIN'); - - \ No newline at end of file +ALTER TABLE `transaction_stop_failed` + ADD COLUMN `charge_box_id` varchar(255) default null AFTER `transaction_pk`;