b219d79a22
now user_favorites clean itself too. And a DBfix for those who installed shimmie before this date.
10 lines
No EOL
470 B
PHP
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>");
|
|
?>
|