diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php
index 38ed6a37fde626362f09d90f4e62836100b0db30..47e7753f3c33744a38583eb93f2b5b709d428549 100644
--- a/htdocs/core/modules/modOauth.class.php
+++ b/htdocs/core/modules/modOauth.class.php
@@ -105,14 +105,14 @@ class modOauth extends DolibarrModules
         $r=0;
 
         // This is to declare the Top Menu entry:
-        //$this->menu[$r]=array(  'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools',               // Put 0 if this is a top menu
+        //$this->menu[$r]=array(  'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools',               // Put 0 if this is a top menu
         //                        'type'=>'left',                 // This is a Top menu entry
         //                        'titre'=>'MenuOauth',
         //                        'mainmenu'=>'oauth',
         //                        'url'=>'/oauth/index.php',
         //                        'langs'=>'oauth',            // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
         //                        'position'=>300,
-        //                        'enabled'=>'$conf->oauth->enabled && $leftmenu==\'admintools\'',
+        //                        'enabled'=>'$conf->oauth->enabled && $leftmenu==\'modulesadmintools\'',
         //                        'perms'=>'$user->rights->oauth->read',    // Use 'perms'=>'1' if you want your menu with no permission rules
         //                        'target'=>'',
         //                        'user'=>0);                     // 0=Menu for internal users, 1=external users, 2=both
@@ -138,11 +138,6 @@ class modOauth extends DolibarrModules
         // Clean before activation
         $this->remove($options);
 
-        $sql = array(
-            "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_state (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), state varchar(128), fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
-            "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_token (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), token text, fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
-            );
-
         return $this->_init($sql,$options);
     }
 }
diff --git a/htdocs/install/mysql/tables/llx_oauth_state.sql b/htdocs/install/mysql/tables/llx_oauth_state.sql
new file mode 100644
index 0000000000000000000000000000000000000000..c6b9601fa6cecff2a48d1586b0848ee605c19787
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_oauth_state.sql
@@ -0,0 +1,25 @@
+-- ============================================================================
+-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-- ============================================================================
+
+CREATE TABLE llx_oauth_state (
+    rowid integer AUTO_INCREMENT PRIMARY KEY,
+    service varchar(36),
+    state varchar(128),
+    fk_user integer,
+    fk_adherent integer,
+    entity integer
+)  ENGINE=InnoDB;
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql
new file mode 100644
index 0000000000000000000000000000000000000000..64a905b795c42481a2228b0d045ad13ed503edbc
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_oauth_token.sql
@@ -0,0 +1,25 @@
+-- ============================================================================
+-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-- ============================================================================
+
+CREATE TABLE llx_oauth_token (
+    rowid integer AUTO_INCREMENT PRIMARY KEY,
+    service varchar(36),
+    token text,
+    fk_user integer,
+    fk_adherent integer,
+    entity integer
+)  ENGINE=InnoDB;
\ No newline at end of file