Hi,

We have to add additional tables to userstore database in order to make the
oAuth work with standalone fresh pack. Currently we get the WSO2CARBON_DB
from kernel which does not include those databases.
In order to add them I tried executing those database scripts on top of
WSO2CARBON_DB so it will include those additional databases. I added below
to pom of the stratos/distribution 's ant run plugin. The database queries
get executed successfully. However kernel unpack get executed after this
which resulted in overwriting the modified WSO2CARBON_DB.


   1. <sql
   2.                                        driver="org.h2.Driver"
   3.                                        url=
   
"jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database//WSO2CARBON_DB"
   4.                                        userid="wso2carbon" password=
   "wso2carbon" autocommit="true"
   5.                                        onerror="continue">
   6.                                     <classpath>
   7.                                         <path refid="h2.classpath"/>
   8.                                     </classpath>
   9.                                     <fileset
   10.                                            file=
   "target/wso2carbon-core-4.2.0/dbscripts/identity/application-mgt/h2.sql"
   />
   11.                                 </sql>
   12.                                 <sql
   13.                                        driver="org.h2.Driver"
   14.                                        url=
   
"jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database/WSO2CARBON_DB"
   15.                                        userid="wso2carbon" password=
   "wso2carbon" autocommit="true"
   16.                                        onerror="continue">
   17.                                     <classpath>
   18.                                         <path refid="h2.classpath"/>
   19.                                     </classpath>
   20.                                     <fileset
   21.                                            file=
   "target/wso2carbon-core-4.2.0/dbscripts/identity/h2.sql"/>
   22.                                 </sql>


[1] [Testing] Stratos 4.1.0 Alpha - database error deploying cartridge -
Table 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist -schema change ?

-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Reply via email to