blob: 975f57e214329dcefdf2a7f8fc605eba81e8ed73 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2// @description: Program used to upgrade the database to fix a bug which didn't let multiple users have an empty DNI.
3
4require_once(__DIR__."/../core.php");
5
6if (php_sapi_name() != "cli") {
7 security::notFound();
8 exit();
9}
10
11echo "=====================\n";
12echo "3_peoplednibugfix.php\n";
13echo "=====================\n\n";
14
15echo "[info] Removing unique index for field dni in table people...\n";
16if (!mysqli_query($con, "ALTER TABLE people DROP INDEX dni")) die("[fatal error] Couldn't delete index: ".mysqli_error($con)."\n");
17
18echo "[info] Done\n";