Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-09 Thread Abimaran Kugathasan
I'm Ok to enhance the documentation, but, we don't really need to use / as
the terminator in migration scripts as they are supposed to run manually.

On Tue, May 9, 2017 at 12:22 PM, Rajith Roshan  wrote:

> Hi,
>
> Yeah I think we can agree with maduranga. AFAIK this only happens with
> db2. Because its default delimiter is ;. Other dbscripts get executed when
> we run them against the database. Its better to update the docs in order to
> provide guidance saying that delimiter we have used in our db scripts are
> "/"  so we can give options to specify delimiter when running db script as
> in [1]
>
> [1] - db2 -td/ -vf db2.sql
>
> On Tue, May 9, 2017 at 11:01 AM, Maduranga Siriwardena  > wrote:
>
>> Hi Abimaran,
>>
>> Usually if we start the pack with -Dsetup option product database scripts
>> are run through [1] to create databases which specifically checks for "/"
>> to identify a single query for DB2. So product database scripts has "/" as
>> the statement terminator. Anyway this terminator will not be there in the
>> query when executing the query.
>>
>> We also have created a similar class to execute the database scripts in
>> migration and used the similar approach with "/". In my opinion if we are
>> going to change this, we need to do this everywhere in the product.
>>
>> [1] https://github.com/wso2/carbon-kernel/blob/v4.4.16/core/
>> org.wso2.carbon.utils/src/main/java/org/wso2/carbon/util
>> s/dbcreator/DatabaseCreator.java#L291
>>
>> Thanks,
>>
>> On Tue, May 9, 2017 at 10:12 AM, Abimaran Kugathasan 
>> wrote:
>>
>>> Hi Ishara,
>>>
>>> Any reason for having / as the statement terminator in DB2 script? The
>>> default DB2 statement terminator is ;
>>>
>>> API Manager had the same issue and we fixed it.
>>>
>>> [1] : https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/c
>>> om.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
>>> [2] : https://dba.stackexchange.com/questions/122652/what-is-the
>>> -formal-statement-terminator-with-db2-sql
>>>
>>>
>>> On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna 
>>> wrote:
>>>
 Thanks Rajith for finding out this.

 @Dinali Can you please update the scripts.

 -Ishara

 On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan 
 wrote:

> The migration resources for db2 specified in step 11 of doc [1] is
> giving errors. It tries to insert boolean values to columns which have 
> type
> smallint. They should be replaced with 0s and 1s. Please find the modified
> script below [2]
>
> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+Previ
> ous+Release
>
> [2] -
> INSERT INTO UM_CLAIM (
> UM_DIALECT_ID,
> UM_CLAIM_URI,
> UM_DISPLAY_TAG,
> UM_DESCRIPTION,
> UM_MAPPED_ATTRIBUTE,
> UM_TENANT_ID,
> UM_READ_ONLY,
>UM_SUPPORTED,
>UM_REQUIRED,
>UM_DISPLAY_ORDER,
>UM_CHECKED_ATTRIBUTE)
> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
> 'http://wso2.org/claims/identity/lastLoginTime','Last Login
> Time','Last Login Time','carLicense',-1234,1,0,0,7,0)/
>
>
> INSERT INTO UM_CLAIM (
>UM_DIALECT_ID,
>UM_CLAIM_URI,
>UM_DISPLAY_TAG,
>UM_DESCRIPTION,
>UM_MAPPED_ATTRIBUTE,
>UM_TENANT_ID,
>UM_READ_ONLY)
>
> SELECT DIALECT.UM_ID,
>   'http://wso2.org/claims/identity/lastLoginTime',
>'Last Login Time',
>'Last Login Time',
>'carLicense',
>   DIALECT.UM_TENANT_ID,
>1
>FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
> /wso2.org/claims'/
>
>
> INSERT INTO UM_CLAIM (
> UM_DIALECT_ID,
> UM_CLAIM_URI,
> UM_DISPLAY_TAG,
> UM_DESCRIPTION,
> UM_MAPPED_ATTRIBUTE,
> UM_TENANT_ID,
> UM_READ_ONLY,
>UM_SUPPORTED,
>UM_REQUIRED,
>UM_DISPLAY_ORDER,
>UM_CHECKED_ATTRIBUTE)
> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
> 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last
> Password Update','Last Password Update','businessCategory',-12
> 34,1,0,0,7,0)/
>
>
> INSERT INTO UM_CLAIM (
>UM_DIALECT_ID,
>UM_CLAIM_URI,
>UM_DISPLAY_TAG,
>UM_DESCRIPTION,
>UM_MAPPED_ATTRIBUTE,
>UM_TENANT_ID,
>UM_READ_ONLY)
>
> SELECT 

Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-09 Thread Rajith Roshan
Hi,

Yeah I think we can agree with maduranga. AFAIK this only happens with db2.
Because its default delimiter is ;. Other dbscripts get executed when we
run them against the database. Its better to update the docs in order to
provide guidance saying that delimiter we have used in our db scripts are
"/"  so we can give options to specify delimiter when running db script as
in [1]

[1] - db2 -td/ -vf db2.sql

On Tue, May 9, 2017 at 11:01 AM, Maduranga Siriwardena 
wrote:

> Hi Abimaran,
>
> Usually if we start the pack with -Dsetup option product database scripts
> are run through [1] to create databases which specifically checks for "/"
> to identify a single query for DB2. So product database scripts has "/" as
> the statement terminator. Anyway this terminator will not be there in the
> query when executing the query.
>
> We also have created a similar class to execute the database scripts in
> migration and used the similar approach with "/". In my opinion if we are
> going to change this, we need to do this everywhere in the product.
>
> [1] https://github.com/wso2/carbon-kernel/blob/v4.4.16/
> core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/
> DatabaseCreator.java#L291
>
> Thanks,
>
> On Tue, May 9, 2017 at 10:12 AM, Abimaran Kugathasan 
> wrote:
>
>> Hi Ishara,
>>
>> Any reason for having / as the statement terminator in DB2 script? The
>> default DB2 statement terminator is ;
>>
>> API Manager had the same issue and we fixed it.
>>
>> [1] : https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/c
>> om.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
>> [2] : https://dba.stackexchange.com/questions/122652/what-is-the
>> -formal-statement-terminator-with-db2-sql
>>
>>
>> On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna 
>> wrote:
>>
>>> Thanks Rajith for finding out this.
>>>
>>> @Dinali Can you please update the scripts.
>>>
>>> -Ishara
>>>
>>> On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan  wrote:
>>>
 The migration resources for db2 specified in step 11 of doc [1] is
 giving errors. It tries to insert boolean values to columns which have type
 smallint. They should be replaced with 0s and 1s. Please find the modified
 script below [2]

 [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+Previ
 ous+Release

 [2] -
 INSERT INTO UM_CLAIM (
 UM_DIALECT_ID,
 UM_CLAIM_URI,
 UM_DISPLAY_TAG,
 UM_DESCRIPTION,
 UM_MAPPED_ATTRIBUTE,
 UM_TENANT_ID,
 UM_READ_ONLY,
UM_SUPPORTED,
UM_REQUIRED,
UM_DISPLAY_ORDER,
UM_CHECKED_ATTRIBUTE)
 VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
 http://wso2.org/claims' AND UM_TENANT_ID=-1234),
 'http://wso2.org/claims/identity/lastLoginTime','Last Login
 Time','Last Login Time','carLicense',-1234,1,0,0,7,0)/


 INSERT INTO UM_CLAIM (
UM_DIALECT_ID,
UM_CLAIM_URI,
UM_DISPLAY_TAG,
UM_DESCRIPTION,
UM_MAPPED_ATTRIBUTE,
UM_TENANT_ID,
UM_READ_ONLY)

 SELECT DIALECT.UM_ID,
   'http://wso2.org/claims/identity/lastLoginTime',
'Last Login Time',
'Last Login Time',
'carLicense',
   DIALECT.UM_TENANT_ID,
1
FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
 DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
 /wso2.org/claims'/


 INSERT INTO UM_CLAIM (
 UM_DIALECT_ID,
 UM_CLAIM_URI,
 UM_DISPLAY_TAG,
 UM_DESCRIPTION,
 UM_MAPPED_ATTRIBUTE,
 UM_TENANT_ID,
 UM_READ_ONLY,
UM_SUPPORTED,
UM_REQUIRED,
UM_DISPLAY_ORDER,
UM_CHECKED_ATTRIBUTE)
 VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
 http://wso2.org/claims' AND UM_TENANT_ID=-1234),
 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last
 Password Update','Last Password Update','businessCategory',-12
 34,1,0,0,7,0)/


 INSERT INTO UM_CLAIM (
UM_DIALECT_ID,
UM_CLAIM_URI,
UM_DISPLAY_TAG,
UM_DESCRIPTION,
UM_MAPPED_ATTRIBUTE,
UM_TENANT_ID,
UM_READ_ONLY)

 SELECT DIALECT.UM_ID,
 'http://wso2.org/claims/identity/lastPasswordUpdateTime',
 'Last Password Update',
 'Last Password Update',
 'businessCategory',
 DIALECT.UM_TENANT_ID,
 1
 FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
 DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
 

Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-08 Thread Maduranga Siriwardena
Hi Abimaran,

Usually if we start the pack with -Dsetup option product database scripts
are run through [1] to create databases which specifically checks for "/"
to identify a single query for DB2. So product database scripts has "/" as
the statement terminator. Anyway this terminator will not be there in the
query when executing the query.

We also have created a similar class to execute the database scripts in
migration and used the similar approach with "/". In my opinion if we are
going to change this, we need to do this everywhere in the product.

[1]
https://github.com/wso2/carbon-kernel/blob/v4.4.16/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java#L291

Thanks,

On Tue, May 9, 2017 at 10:12 AM, Abimaran Kugathasan 
wrote:

> Hi Ishara,
>
> Any reason for having / as the statement terminator in DB2 script? The
> default DB2 statement terminator is ;
>
> API Manager had the same issue and we fixed it.
>
> [1] : https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/
> com.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
> [2] : https://dba.stackexchange.com/questions/122652/what-is-
> the-formal-statement-terminator-with-db2-sql
>
>
> On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna 
> wrote:
>
>> Thanks Rajith for finding out this.
>>
>> @Dinali Can you please update the scripts.
>>
>> -Ishara
>>
>> On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan  wrote:
>>
>>> The migration resources for db2 specified in step 11 of doc [1] is
>>> giving errors. It tries to insert boolean values to columns which have type
>>> smallint. They should be replaced with 0s and 1s. Please find the modified
>>> script below [2]
>>>
>>> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+Previ
>>> ous+Release
>>>
>>> [2] -
>>> INSERT INTO UM_CLAIM (
>>> UM_DIALECT_ID,
>>> UM_CLAIM_URI,
>>> UM_DISPLAY_TAG,
>>> UM_DESCRIPTION,
>>> UM_MAPPED_ATTRIBUTE,
>>> UM_TENANT_ID,
>>> UM_READ_ONLY,
>>>UM_SUPPORTED,
>>>UM_REQUIRED,
>>>UM_DISPLAY_ORDER,
>>>UM_CHECKED_ATTRIBUTE)
>>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>>> 'http://wso2.org/claims/identity/lastLoginTime','Last Login Time','Last
>>> Login Time','carLicense',-1234,1,0,0,7,0)/
>>>
>>>
>>> INSERT INTO UM_CLAIM (
>>>UM_DIALECT_ID,
>>>UM_CLAIM_URI,
>>>UM_DISPLAY_TAG,
>>>UM_DESCRIPTION,
>>>UM_MAPPED_ATTRIBUTE,
>>>UM_TENANT_ID,
>>>UM_READ_ONLY)
>>>
>>> SELECT DIALECT.UM_ID,
>>>   'http://wso2.org/claims/identity/lastLoginTime',
>>>'Last Login Time',
>>>'Last Login Time',
>>>'carLicense',
>>>   DIALECT.UM_TENANT_ID,
>>>1
>>>FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>>> /wso2.org/claims'/
>>>
>>>
>>> INSERT INTO UM_CLAIM (
>>> UM_DIALECT_ID,
>>> UM_CLAIM_URI,
>>> UM_DISPLAY_TAG,
>>> UM_DESCRIPTION,
>>> UM_MAPPED_ATTRIBUTE,
>>> UM_TENANT_ID,
>>> UM_READ_ONLY,
>>>UM_SUPPORTED,
>>>UM_REQUIRED,
>>>UM_DISPLAY_ORDER,
>>>UM_CHECKED_ATTRIBUTE)
>>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last Password
>>> Update','Last Password Update','businessCategory',-1234,1,0,0,7,0)/
>>>
>>>
>>> INSERT INTO UM_CLAIM (
>>>UM_DIALECT_ID,
>>>UM_CLAIM_URI,
>>>UM_DISPLAY_TAG,
>>>UM_DESCRIPTION,
>>>UM_MAPPED_ATTRIBUTE,
>>>UM_TENANT_ID,
>>>UM_READ_ONLY)
>>>
>>> SELECT DIALECT.UM_ID,
>>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime',
>>> 'Last Password Update',
>>> 'Last Password Update',
>>> 'businessCategory',
>>> DIALECT.UM_TENANT_ID,
>>> 1
>>> FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>>> /wso2.org/claims'/
>>>
>>>
>>> CREATE INDEX REG_LOG_IND_BY_P1
>>> ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID)/
>>>
>>> CREATE INDEX REG_RESOURCE_IND_3
>>> ON REG_RESOURCE(REG_UUID)/
>>>
>>> CREATE INDEX REG_RESOURCE_IND_4
>>> ON REG_RESOURCE(REG_TENANT_ID, REG_UUID)/
>>>
>>> CREATE INDEX REG_RESOURCE_IND_5
>>> ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE)/
>>> --
>>> Rajith Roshan
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>>
>>
>>
>>
>> --
>> Ishara Karunarathna
>> Associate Technical Lead
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> email: isha...@wso2.com,   blog: 

Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-08 Thread Abimaran Kugathasan
Hi Ishara,

Any reason for having / as the statement terminator in DB2 script? The
default DB2 statement terminator is ;

API Manager had the same issue and we fixed it.

[1] :
https://www.ibm.com/support/knowledgecenter/SS62YD_2.2.1/com.ibm.datatools.sqlxeditor.doc/topics/tchngstmtterm.html
[2] :
https://dba.stackexchange.com/questions/122652/what-is-the-formal-statement-terminator-with-db2-sql


On Sat, May 6, 2017 at 11:16 AM, Ishara Karunarathna 
wrote:

> Thanks Rajith for finding out this.
>
> @Dinali Can you please update the scripts.
>
> -Ishara
>
> On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan  wrote:
>
>> The migration resources for db2 specified in step 11 of doc [1] is giving
>> errors. It tries to insert boolean values to columns which have type
>> smallint. They should be replaced with 0s and 1s. Please find the modified
>> script below [2]
>>
>> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+a+
>> Previous+Release
>>
>> [2] -
>> INSERT INTO UM_CLAIM (
>> UM_DIALECT_ID,
>> UM_CLAIM_URI,
>> UM_DISPLAY_TAG,
>> UM_DESCRIPTION,
>> UM_MAPPED_ATTRIBUTE,
>> UM_TENANT_ID,
>> UM_READ_ONLY,
>>UM_SUPPORTED,
>>UM_REQUIRED,
>>UM_DISPLAY_ORDER,
>>UM_CHECKED_ATTRIBUTE)
>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>> 'http://wso2.org/claims/identity/lastLoginTime','Last Login Time','Last
>> Login Time','carLicense',-1234,1,0,0,7,0)/
>>
>>
>> INSERT INTO UM_CLAIM (
>>UM_DIALECT_ID,
>>UM_CLAIM_URI,
>>UM_DISPLAY_TAG,
>>UM_DESCRIPTION,
>>UM_MAPPED_ATTRIBUTE,
>>UM_TENANT_ID,
>>UM_READ_ONLY)
>>
>> SELECT DIALECT.UM_ID,
>>   'http://wso2.org/claims/identity/lastLoginTime',
>>'Last Login Time',
>>'Last Login Time',
>>'carLicense',
>>   DIALECT.UM_TENANT_ID,
>>1
>>FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>> /wso2.org/claims'/
>>
>>
>> INSERT INTO UM_CLAIM (
>> UM_DIALECT_ID,
>> UM_CLAIM_URI,
>> UM_DISPLAY_TAG,
>> UM_DESCRIPTION,
>> UM_MAPPED_ATTRIBUTE,
>> UM_TENANT_ID,
>> UM_READ_ONLY,
>>UM_SUPPORTED,
>>UM_REQUIRED,
>>UM_DISPLAY_ORDER,
>>UM_CHECKED_ATTRIBUTE)
>> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='
>> http://wso2.org/claims' AND UM_TENANT_ID=-1234),
>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last Password
>> Update','Last Password Update','businessCategory',-1234,1,0,0,7,0)/
>>
>>
>> INSERT INTO UM_CLAIM (
>>UM_DIALECT_ID,
>>UM_CLAIM_URI,
>>UM_DISPLAY_TAG,
>>UM_DESCRIPTION,
>>UM_MAPPED_ATTRIBUTE,
>>UM_TENANT_ID,
>>UM_READ_ONLY)
>>
>> SELECT DIALECT.UM_ID,
>> 'http://wso2.org/claims/identity/lastPasswordUpdateTime',
>> 'Last Password Update',
>> 'Last Password Update',
>> 'businessCategory',
>> DIALECT.UM_TENANT_ID,
>> 1
>> FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
>> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
>> /wso2.org/claims'/
>>
>>
>> CREATE INDEX REG_LOG_IND_BY_P1
>> ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_3
>> ON REG_RESOURCE(REG_UUID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_4
>> ON REG_RESOURCE(REG_TENANT_ID, REG_UUID)/
>>
>> CREATE INDEX REG_RESOURCE_IND_5
>> ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE)/
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> Ishara Karunarathna
> Associate Technical Lead
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> email: isha...@wso2.com,   blog: isharaaruna.blogspot.com,   mobile:
> +94717996791 <+94%2071%20799%206791>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820


  
  
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IS 5.2.0 DB2 migration scripts

2017-05-05 Thread Ishara Karunarathna
Thanks Rajith for finding out this.

@Dinali Can you please update the scripts.

-Ishara

On Fri, May 5, 2017 at 11:52 PM, Rajith Roshan  wrote:

> The migration resources for db2 specified in step 11 of doc [1] is giving
> errors. It tries to insert boolean values to columns which have type
> smallint. They should be replaced with 0s and 1s. Please find the modified
> script below [2]
>
> [1] - https://docs.wso2.com/display/IS520/Upgrading+from+
> a+Previous+Release
>
> [2] -
> INSERT INTO UM_CLAIM (
> UM_DIALECT_ID,
> UM_CLAIM_URI,
> UM_DISPLAY_TAG,
> UM_DESCRIPTION,
> UM_MAPPED_ATTRIBUTE,
> UM_TENANT_ID,
> UM_READ_ONLY,
>UM_SUPPORTED,
>UM_REQUIRED,
>UM_DISPLAY_ORDER,
>UM_CHECKED_ATTRIBUTE)
> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='http://wso2.
> org/claims' AND UM_TENANT_ID=-1234),
> 'http://wso2.org/claims/identity/lastLoginTime','Last Login Time','Last
> Login Time','carLicense',-1234,1,0,0,7,0)/
>
>
> INSERT INTO UM_CLAIM (
>UM_DIALECT_ID,
>UM_CLAIM_URI,
>UM_DISPLAY_TAG,
>UM_DESCRIPTION,
>UM_MAPPED_ATTRIBUTE,
>UM_TENANT_ID,
>UM_READ_ONLY)
>
> SELECT DIALECT.UM_ID,
>   'http://wso2.org/claims/identity/lastLoginTime',
>'Last Login Time',
>'Last Login Time',
>'carLicense',
>   DIALECT.UM_TENANT_ID,
>1
>FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
> /wso2.org/claims'/
>
>
> INSERT INTO UM_CLAIM (
> UM_DIALECT_ID,
> UM_CLAIM_URI,
> UM_DISPLAY_TAG,
> UM_DESCRIPTION,
> UM_MAPPED_ATTRIBUTE,
> UM_TENANT_ID,
> UM_READ_ONLY,
>UM_SUPPORTED,
>UM_REQUIRED,
>UM_DISPLAY_ORDER,
>UM_CHECKED_ATTRIBUTE)
> VALUES ((SELECT UM_ID FROM UM_DIALECT WHERE UM_DIALECT_URI='http://wso2.
> org/claims' AND UM_TENANT_ID=-1234),
> 'http://wso2.org/claims/identity/lastPasswordUpdateTime','Last Password
> Update','Last Password Update','businessCategory',-1234,1,0,0,7,0)/
>
>
> INSERT INTO UM_CLAIM (
>UM_DIALECT_ID,
>UM_CLAIM_URI,
>UM_DISPLAY_TAG,
>UM_DESCRIPTION,
>UM_MAPPED_ATTRIBUTE,
>UM_TENANT_ID,
>UM_READ_ONLY)
>
> SELECT DIALECT.UM_ID,
> 'http://wso2.org/claims/identity/lastPasswordUpdateTime',
> 'Last Password Update',
> 'Last Password Update',
> 'businessCategory',
> DIALECT.UM_TENANT_ID,
> 1
> FROM UM_DIALECT as DIALECT JOIN UM_TENANT as TENANT ON
> DIALECT.UM_TENANT_ID=TENANT.UM_ID WHERE DIALECT.UM_DIALECT_URI='http:/
> /wso2.org/claims'/
>
>
> CREATE INDEX REG_LOG_IND_BY_P1
> ON REG_LOG(REG_LOGGED_TIME, REG_TENANT_ID)/
>
> CREATE INDEX REG_RESOURCE_IND_3
> ON REG_RESOURCE(REG_UUID)/
>
> CREATE INDEX REG_RESOURCE_IND_4
> ON REG_RESOURCE(REG_TENANT_ID, REG_UUID)/
>
> CREATE INDEX REG_RESOURCE_IND_5
> ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE)/
> --
> Rajith Roshan
> Software Engineer, WSO2 Inc.
> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>



-- 
Ishara Karunarathna
Associate Technical Lead
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

email: isha...@wso2.com,   blog: isharaaruna.blogspot.com,   mobile:
+94717996791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev