Table Alteration

drop_field() (PostgreSQL only)
rename_field() (PostgreSQL only)
set_field_type() (PostgreSQL only)

All tables have a rename_from() method, which changes some SQL table's name to the table object's target name. It's a wrapper for SQL's ALTER TABLE ... RENAME TO.

The form is t.rename_from(oldname), where t is a table object, and oldname is a std::string containing the current SQL name of some table.

rename_from() cannot move a table from one PostgreSQL schema to another, or from one sqlite attached database to another. So oldname must be a one-part name: the local name of an existing table within the same schema or attached database as t's target.