diff --git a/setup/database/wkvs-database-template.sql b/setup/database/wkvs-database-template.sql index bfae6a4..a8085f4 100644 --- a/setup/database/wkvs-database-template.sql +++ b/setup/database/wkvs-database-template.sql @@ -51,14 +51,15 @@ CREATE TABLE `prefix-placeholder_einmal_links` ( -- -- Trigger `prefix-placeholder_einmal_links` -- -DELIMITER $$ -CREATE TRIGGER `before_insert_login_tokens` BEFORE INSERT ON `prefix-placeholder_einmal_links` FOR EACH ROW BEGIN - IF NEW.url IS NULL THEN - SET NEW.url = HEX(RANDOM_BYTES(32)); - END IF; -END -$$ -DELIMITER ; + +CREATE TRIGGER `before_insert_login_tokens` +BEFORE INSERT ON `prefix-placeholder_einmal_links` +FOR EACH ROW +BEGIN + IF NEW.url IS NULL THEN + SET NEW.url = HEX(RANDOM_BYTES(32)); + END IF; +END; -- -------------------------------------------------------- @@ -206,7 +207,7 @@ CREATE TABLE `prefix-placeholder_verbuchte_startgebueren` ( `preis` float DEFAULT NULL, `user_id` int(11) NOT NULL, `item_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`item_ids`)), - `used_verein_konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '\'{}\'', + `used_verein_konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, `order_status` int(11) NOT NULL DEFAULT 0, `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), `edited_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() diff --git a/setup/init-env.php b/setup/init-env.php index 649b576..d729654 100644 --- a/setup/init-env.php +++ b/setup/init-env.php @@ -16,7 +16,7 @@ $envMappings = [ '/REDDIS_HOST=localhost/' => 'REDDIS_HOST=redis', '/REDDIS_HOST=YOUR_REDDIS_IP.*/' => 'REDDIS_HOST=redis', '/REDDIS_PORT=YOUR_REDDIS_PORT.*/' => 'REDDIS_PORT=6379', - '/YOUR_REDDIS_PASSWORD/' => base64_encode(random_bytes(64)), + '/YOUR_REDDIS_PASSWORD/' => '"' . base64_encode(random_bytes(64)) . '"', ] ], 'env.db' => [ @@ -24,7 +24,7 @@ $envMappings = [ 'replacements' => [ '/MYSQL_HOST=localhost/' => 'MYSQL_HOST=mariadb', '/MYSQL_HOST=127\.0\.0\.1/' => 'MYSQL_HOST=mariadb', - '/YOUR_PASSWORD_FOR_ROOT/' => base64_encode(random_bytes(64)), + '/YOUR_PASSWORD_FOR_ROOT/' => '"' . base64_encode(random_bytes(64)) . '"', '/YOUR_DATABASE_NAME/' => 'devdb_', ] ], @@ -37,7 +37,7 @@ $envMappings = [ 'env.pw-encryption-key' => [ 'example' => 'env.pw-encryption-key.example', 'replacements' => [ - '/YOUR_CUSTOM_PASSWORD_ENCRYPTION_KEY/' => base64_encode(random_bytes(64)), + '/YOUR_CUSTOM_PASSWORD_ENCRYPTION_KEY/' => '"' . base64_encode(random_bytes(64)) . '"', ] ], 'env.wk-id' => [