How to transfer model changes in pylons / sqlalchemy?

I created a simple model and then mapped it to a class using sqlalchemy in pylons:

tag_table = schema.Table('tag', meta.metadata,
    schema.Column('id', types.Integer,
                  schema.Sequence('tag_seq_id', optional=True),
                  primary_key=True),
    schema.Column('name', types.Unicode(20), nullable=False, unique=True),
)

class Tag(object):
    pass
orm.mapper(Tag, tag_table)

When I run paster setup-app development.ini, I see that the table is created, but if I add another column to my table, how can I transfer the only column I added?

I saw this migration in Rails and Django, but is there something similar for Pylons?

+3
source share
1 answer

You can try this tool: sqlalchemy-migrate

+2
source

Source: https://habr.com/ru/post/1765509/


All Articles