[odb-users] create_schema deletes db tables

Per Edin info at peredin.com
Fri Jul 5 10:25:39 EDT 2013


If you are creating a new database, call create_schema.

If you are opening an existing database, do NOT call create_schema.



On Fri, Jul 5, 2013 at 4:20 PM, Lidia Kalinovsky <lidia at lemur-soft.com>wrote:

> May be - thank you.
> So, the question is : how do I know if I should call create_schema
> function ? To check if sqlite file exists ?
>
>
> On Fri, Jul 5, 2013 at 5:13 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:
>
>> Hi Lidia,
>>
>> Lidia Kalinovsky <lidia at lemur-soft.com> writes:
>>
>> > But sometimes ( I haven't realized when exactly ) I get "table .. not
>> > exist" exception if create_schema is not called.
>>
>> The create_schema() function re-creates the database schema, that is,
>> drops and then creates all the tables necessary to store your objects.
>>
>> Perhaps you are getting an exception after adding some new classes
>> and trying to persist them in an existing database which only has
>> tables for older classes?
>>
>> Boris
>>
>
>
>
> --
> Software integration and outsourcing services,
> Lemur-Soft, Giv'at Nili
> Israel, 37825
> Phone : (+972) 545748325
> Fax : (+972) 775345383
> Email : lidia at lemur-soft.com
> Web: www.lemur-soft.com
>


More information about the odb-users mailing list