« Return to Thread: Create a table using liquibase api

Re: Create a table using liquibase api

by LiquiBase Community Forum :: Rate this Message:

Reply to Author | View in Thread

You can do that, exactly how depends on if you are using liquibase 1.x
or 2.x.  For 2.0, the easiest way (if you know your target database
type) is to create a new CreateTableStatement object and populate it
with the information on the table you want to create.  You need a
Database instance, which is created by calling
DatabaseFactory.findCorrectDatabaseImplementation().  Once you have
your Database object, you can pass your CreateTableStatement object
into the Database.execute() method.

Nathan

On Thu, Oct 29, 2009 at 6:13 AM, Amila Silva <amilac@...> wrote:

>
>
>
>
>
> On Thu, Oct 29, 2009 at 4:41 PM, Amila Silva <amilac@...>
> wrote:
>>
>> hi Everyone,
>>
>> I need to know how to create or update a database table using liquibase
>> api, with out modifying a liquibase change log xml file.
>> please let me know, and can i rollback the dynamically created tables
>> entries without entry in a change log.
>>
>>
>>
>> --
>> Thanks,
>> Regrads,
>>
>> Amila Silva,
>> Associate Software Engineer
>>
>> hSenid Mobile Solutions
>>
>> Phone :
>> +94-77-9983894
>> Fax     :
>> +94-11-2673 845
>>
>> Web:
>> http://www.hSenid.com
>>
>> Make it Happen
>>
>>
>> http://www.hSenidMobile.com
>>
>> Enabling the Mobile World
>>
>>
>> Disclaimer: This email and any files transmitted with it are confidential
>> and intended solely for the use of the individual or entity to which they
>> are addressed. The content and opinions contained in this email are not
>> necessarily those of hSenid Software International. If you have received
>> this email in error please contact the sender.
>>
>
>
>
> --
> Thanks,
> Regrads,
>
> Amila Silva,
> Associate Software Engineer
>
> hSenid Mobile Solutions
>
> Phone :
> +94-77-9983894
> Fax     :
> +94-11-2673 845
>
> Web:
> http://www.hSenid.com
>
> Make it Happen
>
>
> http://www.hSenidMobile.com
>
> Enabling the Mobile World
>
>
> Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to which they
> are addressed. The content and opinions contained in this email are not
> necessarily those of hSenid Software International. If you have received
> this email in error please contact the sender.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Liquibase-user mailing list
> Liquibase-user@...
> https://lists.sourceforge.net/lists/listinfo/liquibase-user
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Liquibase-user mailing list
Liquibase-user@...
https://lists.sourceforge.net/lists/listinfo/liquibase-user

 « Return to Thread: Create a table using liquibase api