Doesn't get created in the database. How do i add columns to tables already defined in the database after i have reflected them into the metadata
On Dec 12, 12:59 am, Empty <mtr...@gmail.com> wrote: > Hi, > > On Thu, Dec 11, 2008 at 8:12 AM, jarrod.ches...@gmail.com < > > > > jarrod.ches...@gmail.com> wrote: > > > Hi > > I've scoured the documentation and i can't find any info on how to > > create a column using metadata. > > > from sqlalchemy import engine > > from sqlalchemy import schema > > from sqlalchemy import types > > > _config_dbengine = engine.create_engine('sqlite:////tmp/db') > > _config_metadata = schema.MetaData(_config_dbengine, reflect=True) > > table = _config_metadata.tables['table_name'] > > table.append_column(schema.Column('id', types.Integer, > > primary_key=True, autoincrement=True)) > > > This is the steps i'm using but the column doesn't get created. > > Doesn't get created where? In the database? That's not going to happen. > Are you saying it's not included as part of the table definition? > > Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---