Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
Source code for galaxy.model.migrate.versions.0132_add_lastpasswordchange_to_user
"""
Migration script to add a last_password_change field to the user table
"""
from sqlalchemy import Column, DateTime, MetaData, Table
[docs]def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
account = Table('galaxy_user', meta, autoload=True)
lpc = Column('last_password_change', DateTime())
lpc.create(account)
[docs]def downgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
account = Table('galaxy_user', meta, autoload=True)
account.c.last_password_change.drop()