Merge pull request #5255 from atm-florian/dev_fix5151

FIX: #5151
This commit is contained in:
Laurent Destailleur 2016-06-02 10:05:02 +02:00
commit 537c9637f6
4 changed files with 67 additions and 5 deletions

View File

@ -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);
}
}

View File

@ -481,6 +481,23 @@ update llx_stock_mouvement set batch = '000000' where batch = 'Undefined';
-- At end (higher risk of error)
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
ALTER TABLE llx_product_batch ADD UNIQUE INDEX uk_product_batch (fk_product_stock, batch);
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;
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;

View File

@ -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;

View File

@ -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;