heat.db.sqlalchemy.utils module¶
- heat.db.sqlalchemy.utils.clone_table(name, parent, meta, newcols=None, ignorecols=None, swapcols=None, ignorecons=None)[source]¶
Helper function that clones parent table schema onto new table.
- Parameters
name – new table name
parent – parent table to copy schema from
newcols – names of new columns to be added
ignorecols – names of columns to be ignored while cloning
swapcols – alternative column schema
ignorecons – names of constraints to be ignored
- Returns
sqlalchemy.Table instance