This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/DBupdate.php
NaGeL b219d79a22 A database update, for user deletion
now user_favorites clean itself too.
And a DBfix for those who installed shimmie before this date.
2012-01-20 22:08:19 +01:00

10 lines
No EOL
470 B
PHP

<?php
require_once "core/compat.inc.php";
require_once "core/database.class.php";
include_once "config.php";
$db = new Database();
echo "Fixing user_favorites table....";
($db->Execute("ALTER TABLE user_favorites ENGINE=InnoDB;")) ? print_r("ok<br>") : print_r("failed<br>");
echo "adding Foreign key to users...";
($db->Execute("ALTER TABLE user_favorites ADD FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;"))? print_r("ok<br>"):print_r("failed<br>");
?>