From d17a879f33e7b35c76c52182974246041add99b7 Mon Sep 17 00:00:00 2001
From: Florian HENRY <florian.henry@open-concept.pro>
Date: Tue, 31 May 2016 23:32:21 +0200
Subject: [PATCH] add into migratino script

---
 htdocs/install/mysql/migration/3.9.0-4.0.0.sql  | 17 +++++++++++++++++
 htdocs/install/mysql/tables/llx_oauth_state.sql |  2 +-
 htdocs/install/mysql/tables/llx_oauth_token.sql |  2 +-
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
index 140b0c15089..3b19ef2b2a2 100644
--- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
+++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
@@ -479,6 +479,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;
diff --git a/htdocs/install/mysql/tables/llx_oauth_state.sql b/htdocs/install/mysql/tables/llx_oauth_state.sql
index c6b9601fa6c..92cae17ef07 100644
--- a/htdocs/install/mysql/tables/llx_oauth_state.sql
+++ b/htdocs/install/mysql/tables/llx_oauth_state.sql
@@ -22,4 +22,4 @@ CREATE TABLE llx_oauth_state (
     fk_user integer,
     fk_adherent integer,
     entity integer
-)  ENGINE=InnoDB;
\ No newline at end of file
+)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
index 64a905b795c..5dd5cd0507f 100644
--- a/htdocs/install/mysql/tables/llx_oauth_token.sql
+++ b/htdocs/install/mysql/tables/llx_oauth_token.sql
@@ -22,4 +22,4 @@ CREATE TABLE llx_oauth_token (
     fk_user integer,
     fk_adherent integer,
     entity integer
-)  ENGINE=InnoDB;
\ No newline at end of file
+)ENGINE=InnoDB;
\ No newline at end of file
-- 
GitLab