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