[odb-users] How to add a table to existing schema without
dropping data?
Boris Kolpackov
boris at codesynthesis.com
Wed Jun 8 01:25:06 EDT 2016
Hi Ella,
Ella Vishnevsky <ellav at checkpoint.com> writes:
> I'm using the 2.1.1 odb version.
You may want to consider upgrading to 2.4.0 which supports schema
evolution.
> odb::schema_catalog::create_schema (*m_db_3," schemaName1 ");
Yes, this approach (i.e., packaging each new set of tables into a
separate schema name) is probably your best option if you can't use
schema evolution support.
Note, however, that the string literal should be "schemaName1",
and not " schemaName1 ".
> I'm looking for something like : "add table if does not exist"
> Is it possible?
Only with schema evolution.
Boris
More information about the odb-users
mailing list