¡@

Home 

OpenStack Study: 011_make_mindisk_and_minram_notnull.py

OpenStack Index

**** CubicPower OpenStack Study ****

def upgrade(migrate_engine):

    meta.bind = migrate_engine

    images = sqlalchemy.Table('images', meta, autoload=True)

    images.c.min_disk.alter(nullable=False)

    images.c.min_ram.alter(nullable=False)

**** CubicPower OpenStack Study ****

def downgrade(migrate_engine):

    meta.bind = migrate_engine

    images = sqlalchemy.Table('images', meta, autoload=True)

    images.c.min_disk.alter(nullable=True)

    images.c.min_ram.alter(nullable=True)