Skip to content

Commit 6d38fe8

Browse files
committed
fix MySQL AUTO_INCREMENT
1 parent bf5a336 commit 6d38fe8

File tree

1 file changed

+2
-2
lines changed
  • lxd-dashboard/backend/config

1 file changed

+2
-2
lines changed

lxd-dashboard/backend/config/db.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function initializeLogsTable(){
6565
}
6666

6767
if ($_SESSION['db_type'] == "MySQL"){
68-
$db->exec('CREATE TABLE IF NOT EXISTS lxd_logs (id INTEGER PRIMARY KEY AUTOINCREMENT, control VARCHAR(255), remote_id INTEGER, project VARCHAR(255), object VARCHAR(255), status_code INT, message VARCHAR(255), hostname VARCHAR(255), user_id INT, date DATE);');
68+
$db->exec('CREATE TABLE IF NOT EXISTS lxd_logs (id INTEGER PRIMARY KEY AUTO_INCREMENT, control VARCHAR(255), remote_id INTEGER, project VARCHAR(255), object VARCHAR(255), status_code INT, message VARCHAR(255), hostname VARCHAR(255), user_id INT, date DATE);');
6969
}
7070

7171
$db = null;
@@ -79,7 +79,7 @@ function initializePreferencesTable(){
7979
}
8080

8181
if ($_SESSION['db_type'] == "MySQL"){
82-
$db->exec('CREATE TABLE IF NOT EXISTS lxd_preferences (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255), value VARCHAR(255));');
82+
$db->exec('CREATE TABLE IF NOT EXISTS lxd_preferences (id INTEGER PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), value VARCHAR(255));');
8383
}
8484

8585
//Default Preferences

0 commit comments

Comments
 (0)